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" For version 5.x: Clear all syntax items 14" For version 6.x: Quit when a syntax file was already loaded 15if version < 600 16 syntax clear 17elseif exists("b:current_syntax") 18 finish 19endif 20 21if version >= 600 22 setlocal iskeyword=@,48-57,_,- 23else 24 set iskeyword=@,48-57,_,- 25endif 26 27syn case ignore 28 29syn sync lines=300 30 31"If/else/elsif/endif and while/wend mismatch errors 32syn match clifError "\<wend\>" 33syn match clifError "\<elsif\>" 34syn match clifError "\<else\>" 35syn match clifError "\<endif\>" 36 37syn match clSpaceError "\s\+$" 38 39" If and while regions 40syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure 41syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure 42 43" Make those TODO notes and debugging stand out! 44syn keyword clTodo contained TODO BUG DEBUG FIX 45syn match clNeedsWork contained "NEED[S]*\s\s*WORK" 46syn keyword clDebug contained debug 47 48syn match clComment "#.*$" contains=clTodo,clNeedsWork,@Spell 49syn region clProcedure oneline start="^\s*[{}]" end="$" 50syn match clInclude "^\s*include\s.*" 51 52" We don't put "debug" in the clSetOptions; 53" we contain it in clSet so we can make it stand out. 54syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim 55syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug 56 57syn match clPreProc "^\s*#P.*" 58 59syn keyword clConditional else elsif 60syn keyword clWhile continue endloop 61" 'break' needs to be a region so we can sync on it above. 62syn region clBreak oneline start="^\s*break" end="$" 63 64syn match clOperator "[!;|)(:.><+*=-]" 65 66syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" 67 68syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ contains=@Spell 69syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ contains=@Spell 70 71syn 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 72 73syn 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 74 75syn 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 76 77" Define the default highlighting. 78" For version 5.7 and earlier: only when not done already 79" For version 5.8 and later: only when an item doesn't have highlighting yet 80if version >= 508 || !exists("did_cl_syntax_inits") 81 if version < 508 82 let did_cl_syntax_inits = 1 83 command -nargs=+ HiLink hi link <args> 84 else 85 command -nargs=+ HiLink hi def link <args> 86 endif 87 88 HiLink clifError Error 89 HiLink clSpaceError Error 90 HiLink clWhile Repeat 91 HiLink clConditional Conditional 92 HiLink clDebug Debug 93 HiLink clNeedsWork Todo 94 HiLink clTodo Todo 95 HiLink clComment Comment 96 HiLink clProcedure Procedure 97 HiLink clBreak Procedure 98 HiLink clInclude Include 99 HiLink clSetOption Statement 100 HiLink clSet Identifier 101 HiLink clPreProc PreProc 102 HiLink clOperator Operator 103 HiLink clNumber Number 104 HiLink clString String 105 HiLink clQuote Delimiter 106 HiLink clReserved Identifier 107 HiLink clFunction Function 108 HiLink clStatement Statement 109 110 delcommand HiLink 111endif 112 113let b:current_syntax = "cl" 114 115" vim: ts=8 sw=8 116