if version < 600 syntax clear elseif exists("b:current_syntax") finish endif "setl iskeyword=33-127 setl comments=b:\\ syntax sync minlines=10 syntax case ignore "syntax region String start='\S*\zs" 'hs=s+2 end='"'he=e-1 syntax region String start='\(^\|\s\)\zs\([,.cs]\?"\)\(\s\|$\)'hs=s+2 end='"'he=e-1 syntax region String start='\(^\|\s\)\zs\(abort"\)\(\s\|$\)'hs=s+6 end='"'he=e-1 syntax match String /\(^\|\s\)\zs'\([^\\]\|\\\S\)'\?\ze\(\s\|$\)/hs=s+1,he=e-1 syntax region Character start='\(^\|\s\)\zs\(char\)\s\+'hs=s+4 end='\ze\(\s\|$\)' syntax region String start='\(^\|\s\)\zs\[char\]\s\+'hs=s+6 end='\ze\(\s\|$\)' syntax keyword Boolean true false syntax keyword Conditional ahead if else then syntax match Conditional /<>if\|=if\|if\|if;\|unless\|?dup-if/ syntax match Conditional /\(^\|\s\)\zs\(endif\|exit\|recurse\)\ze\(\s\|$\)/ syntax match Conditional /||\|&&/ syntax match Conditional /\(^\|\s\)\zs\(case\|endcase\|of\|endof\)\ze\(\s\|$\)/ " syntax keyword Repeat for ?for for@ next syntax match Repeat /\(^\|\s\)\zs\(begin\|again\|until\|while\|repeat\)\ze\(\s\|$\)/ " syntax keyword Repeat begin again until while repeat syntax match Repeat /\(^\|\s\)\zs\(do\|loop\|i\|j\|unloop\|leave\)\ze\(\s\|$\)/ syntax match Repeat /\(^\|\s\)\zs\(?do\|-do\|+loop\)\ze\(\s\|$\)/ syntax match Special /does>/ syntax match Define /\(^\|\s\)\zs\(:\|?:\)\ze\(\s\|$\)/ transparent nextgroup=Tag skipwhite syntax match Define /\(^\|\s\)\zs\(+field\|field:\|cfield:\|ffield:\|sffield:\|dffield:\|code\)\ze\(\s\|$\)/ transparent nextgroup=TagOnly skipwhite syntax match Define /bfield:\|wfield:\|lfield:\|xfield:/ transparent nextgroup=TagOnly skipwhite syntax match Tag /\S\+/ contained nextgroup=Compile skipwhite skipnl syntax match Define /\(^\|\s\)\zs\(create\|constant\|2constant\|fconstant\|variable\|2variable\|fvariable\)\ze\(\s\|$\)/ transparent nextgroup=TagOnly skipwhite syntax match Define /\(^\|\s\)\zs\(defer\|is\|alias\|value\)\ze\(\s\|$\)/ transparent nextgroup=TagOnly skipwhite syntax match Define /\(^\|\s\)\zs\(value:\|interpret\/compile:\)\ze\(\s\|$\)/ transparent nextgroup=TagOnly skipwhite syntax match TagOnly /\S\+/ contained highlight link TagOnly Tag syntax match Define /:noname/ transparent nextgroup=Compile skipwhite skipnl syntax region Compile start=// end=/\(^\|\s\)\zs\(;\S*\|end-code\)\ze\(\s\|$\)/ contained contains=String,Boolean,Conditional,Repeat,Special,Statement,Comment,Todo syntax match Statement /\(^\|\s\)\zs\(postpone\|\['\]\)\s\+\S\+/ contains=Macro syntax match IStatement /\(^\|\s\)\zs'\s\+\S\+/ contains=Macro syntax match Macro /\s\S\+/ contained highlight link IStatement Statement syntax keyword Todo FIXME XXX TODO syntax region Comment start='\(^\|\s\)\.\?(\(\s\|$\)' end=')' contains=Todo syntax region Comment start='\(^\|\s\)(\*\(\s\|$\)' end='\(^\|\s\)\*)\(\s\|$\)' contains=Todo syntax match Comment /\(^\|\s\)\\\(\s\|$\).*$/ contains=Todo syntax match Comment /\(^\|\s\)\\G\(\s\|$\).*$/ contains=Todo highlight Comment ctermfg=White highlight Compile ctermfg=DarkGreen highlight Macro ctermfg=Cyan let b:current_syntax = "forth"