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 72command -nargs=+ HiLink hi def link <args> 73 74HiLink clifError Error 75HiLink clSpaceError Error 76HiLink clWhile Repeat 77HiLink clConditional Conditional 78HiLink clDebug Debug 79HiLink clNeedsWork Todo 80HiLink clTodo Todo 81HiLink clComment Comment 82HiLink clProcedure Procedure 83HiLink clBreak Procedure 84HiLink clInclude Include 85HiLink clSetOption Statement 86HiLink clSet Identifier 87HiLink clPreProc PreProc 88HiLink clOperator Operator 89HiLink clNumber Number 90HiLink clString String 91HiLink clQuote Delimiter 92HiLink clReserved Identifier 93HiLink clFunction Function 94HiLink clStatement Statement 95 96delcommand HiLink 97 98let b:current_syntax = "cl" 99 100" vim: ts=8 sw=8 101