1" Vim syntax file 2" Language: CL 3" (pronounced alphabetically: "Cee-El". 4" CL stands for Clever Language, 5" but the language is CL, not "Clever". 6" CL was created by Multibase, http://www.mbase.com.au) 7" Filename extensions: *.ent 8" *.eni 9" Maintainer: Philip Uren <[email protected]> Remove SPAX spam block 10" Version: 6 11" Last Change: Mar 06 2013 12 13" quit when a syntax file was already loaded 14if exists("b:current_syntax") 15 finish 16endif 17 18setlocal iskeyword=@,48-57,_,- 19 20syn case ignore 21 22syn sync lines=300 23 24"If/else/elsif/endif and while/wend mismatch errors 25syn match clifError "\<wend\>" 26syn match clifError "\<elsif\>" 27syn match clifError "\<else\>" 28syn match clifError "\<endif\>" 29 30syn match clSpaceError "\s\+$" 31 32" If and while regions 33syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure 34syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure 35 36" Make those TODO notes and debugging stand out! 37syn keyword clTodo contained TODO BUG DEBUG FIX 38syn match clNeedsWork contained "NEED[S]*\s\s*WORK" 39syn keyword clDebug contained debug 40 41syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell 42syn region clProcedure oneline start="^\s*[{}]" end="$" 43syn match clInclude "^\s*include\s.*" 44 45" We don't put "debug" in the clSetOptions; 46" we contain it in clSet so we can make it stand out. 47syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim 48syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug 49 50syn match clPreProc "^\s*#P.*" 51 52syn keyword clConditional else elsif 53syn keyword clWhile continue endloop 54" 'break' needs to be a region so we can sync on it above. 55syn region clBreak oneline start="^\s*break" end="$" 56 57syn match clOperator "[!;|)(:.><+*=-]" 58 59syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" 60 61syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell 62syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell 63 64syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH 65 66syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match 67 68syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do 69 70" Define the default highlighting. 71" Only when an item doesn't have highlighting yet 72 73hi def link clifError Error 74hi def link clSpaceError Error 75hi def link clWhile Repeat 76hi def link clConditional Conditional 77hi def link clDebug Debug 78hi def link clNeedsWork Todo 79hi def link clTodo Todo 80hi def link clComment Comment 81hi def link clProcedure Procedure 82hi def link clBreak Procedure 83hi def link clInclude Include 84hi def link clSetOption Statement 85hi def link clSet Identifier 86hi def link clPreProc PreProc 87hi def link clOperator Operator 88hi def link clNumber Number 89hi def link clString String 90hi def link clQuote Delimiter 91hi def link clReserved Identifier 92hi def link clFunction Function 93hi def link clStatement Statement 94 95 96let b:current_syntax = "cl" 97 98" vim: ts=8 sw=8 99