cheetah.vim (1752B)
1 " Vim syntax file 2 " Language: Cheetah template engine 3 " Maintainer: Max Ischenko <mfi@ukr.net> 4 " Last Change: 2003-05-11 5 " 6 " Missing features: 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) 10 11 " quit when a syntax file was already loaded 12 if exists("b:current_syntax") 13 finish 14 endif 15 16 syntax case match 17 18 syn keyword cheetahKeyword contained if else unless elif for in not 19 syn keyword cheetahKeyword contained while repeat break continue pass end 20 syn keyword cheetahKeyword contained set del attr def global include raw echo 21 syn keyword cheetahKeyword contained import from extends implements 22 syn keyword cheetahKeyword contained assert raise try catch finally 23 syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter 24 syn match cheetahKeyword contained "\<compiler-settings\>" 25 26 " Matches cached placeholders 27 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display 28 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display 29 syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display 30 31 syn match cheetahContinuation "\\$" 32 syn match cheetahComment "##.*$" display 33 syn region cheetahMultiLineComment start="#\*" end="\*#" 34 35 " Define the default highlighting. 36 " Only when an item doesn't have highlighting yet 37 38 hi def link cheetahPlaceHolder Identifier 39 hi def link cheetahDirective PreCondit 40 hi def link cheetahKeyword Define 41 hi def link cheetahContinuation Special 42 hi def link cheetahComment Comment 43 hi def link cheetahMultiLineComment Comment 44 45 46 let b:current_syntax = "cheetah"