2 " Language: Cheetah template engine
3 " Maintainer: Max Ischenko <mfi@ukr.net>
4 " Last Change: 2003-05-11
7 " match invalid syntax, like bad variable ref. or unmatched closing tag
8 " PSP-style tags: <% .. %> (obsoleted feature)
9 " doc-strings and header comments (rarely used feature)
11 " For version 5.x: Clear all syntax items
12 " For version 6.x: Quit when a syntax file was already loaded
15 elseif exists("b:current_syntax")
21 syn keyword cheetahKeyword contained if else unless elif for in not
22 syn keyword cheetahKeyword contained while repeat break continue pass end
23 syn keyword cheetahKeyword contained set del attr def global include raw echo
24 syn keyword cheetahKeyword contained import from extends implements
25 syn keyword cheetahKeyword contained assert raise try catch finally
26 syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter
27 syn match cheetahKeyword contained "\<compiler-settings\>"
29 " Matches cached placeholders
30 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display
31 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display
32 syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display
34 syn match cheetahContinuation "\\$"
35 syn match cheetahComment "##.*$" display
36 syn region cheetahMultiLineComment start="#\*" end="\*#"
38 " Define the default highlighting.
39 " For version 5.7 and earlier: only when not done already
40 " For version 5.8 and later: only when an item doesn't have highlighting yet
41 if version >= 508 || !exists("did_cheetah_syn_inits")
43 let did_cheetah_syn_inits = 1
44 command -nargs=+ HiLink hi link <args>
46 command -nargs=+ HiLink hi def link <args>
49 HiLink cheetahPlaceHolder Identifier
50 HiLink cheetahDirective PreCondit
51 HiLink cheetahKeyword Define
52 HiLink cheetahContinuation Special
53 HiLink cheetahComment Comment
54 HiLink cheetahMultiLineComment Comment
59 let b:current_syntax = "cheetah"