neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

cl.vim (3905B)


      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	<philuSPAX@ieee.org> Remove SPAX spam block
     10 " Version:              6
     11 " Last Change:		Mar 06 2013
     12 
     13 " quit when a syntax file was already loaded
     14 if exists("b:current_syntax")
     15 finish
     16 endif
     17 
     18 setlocal iskeyword=@,48-57,_,-
     19 
     20 syn case ignore
     21 
     22 syn sync lines=300
     23 
     24 "If/else/elsif/endif and while/wend mismatch errors
     25 syn match	clifError	"\<wend\>"
     26 syn match	clifError	"\<elsif\>"
     27 syn match	clifError	"\<else\>"
     28 syn match	clifError	"\<endif\>"
     29 
     30 syn match	clSpaceError	"\s\+$"
     31 
     32 " If and while regions
     33 syn region	clLoop		transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
     34 syn 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!
     37 syn keyword	clTodo		contained	TODO BUG DEBUG FIX
     38 syn match	clNeedsWork	contained	"NEED[S]*\s\s*WORK"
     39 syn keyword	clDebug		contained	debug
     40 
     41 syn match	clComment	"#.*$"		contains=clTodo,clNeedsWork,@Spell
     42 syn region	clProcedure	oneline		start="^\s*[{}]" end="$"
     43 syn 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.
     47 syn keyword	clSetOptions	transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
     48 syn match	clSet		"^\s*set\s.*" contains=clSetOptions,clDebug
     49 
     50 syn match	clPreProc	"^\s*#P.*"
     51 
     52 syn keyword	clConditional	else elsif
     53 syn keyword	clWhile		continue endloop
     54 " 'break' needs to be a region so we can sync on it above.
     55 syn region	clBreak		oneline start="^\s*break" end="$"
     56 
     57 syn match	clOperator	"[!;|)(:.><+*=-]"
     58 
     59 syn match	clNumber	"\<\d\+\(u\=l\=\|lu\|f\)\>"
     60 
     61 syn region	clString	matchgroup=clQuote	start=+"+ end=+"+	skip=+\\"+ contains=@Spell
     62 syn region	clString	matchgroup=clQuote	start=+'+ end=+'+	skip=+\\'+ contains=@Spell
     63 
     64 syn 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 
     66 syn 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 
     68 syn 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 
     73 hi def link clifError	Error
     74 hi def link clSpaceError	Error
     75 hi def link clWhile		Repeat
     76 hi def link clConditional	Conditional
     77 hi def link clDebug		Debug
     78 hi def link clNeedsWork	Todo
     79 hi def link clTodo		Todo
     80 hi def link clComment	Comment
     81 hi def link clProcedure	Procedure
     82 hi def link clBreak		Procedure
     83 hi def link clInclude	Include
     84 hi def link clSetOption	Statement
     85 hi def link clSet		Identifier
     86 hi def link clPreProc	PreProc
     87 hi def link clOperator	Operator
     88 hi def link clNumber		Number
     89 hi def link clString		String
     90 hi def link clQuote		Delimiter
     91 hi def link clReserved	Identifier
     92 hi def link clFunction	Function
     93 hi def link clStatement	Statement
     94 
     95 
     96 let b:current_syntax = "cl"
     97 
     98 " vim: ts=8 sw=8