blob: 9567ecbbcaf44850788e6a598bdb61a932b842cc [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" 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
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020011" quit when a syntax file was already loaded
12if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000013 finish
14endif
15
16syntax case match
17
18syn keyword cheetahKeyword contained if else unless elif for in not
19syn keyword cheetahKeyword contained while repeat break continue pass end
20syn keyword cheetahKeyword contained set del attr def global include raw echo
21syn keyword cheetahKeyword contained import from extends implements
22syn keyword cheetahKeyword contained assert raise try catch finally
23syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter
24syn match cheetahKeyword contained "\<compiler-settings\>"
25
26" Matches cached placeholders
27syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display
28syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display
29syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display
30
31syn match cheetahContinuation "\\$"
32syn match cheetahComment "##.*$" display
33syn region cheetahMultiLineComment start="#\*" end="\*#"
34
35" Define the default highlighting.
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020036" Only when an item doesn't have highlighting yet
Bram Moolenaar071d4272004-06-13 20:20:40 +000037
Bram Moolenaarf37506f2016-08-31 22:22:10 +020038hi def link cheetahPlaceHolder Identifier
39hi def link cheetahDirective PreCondit
40hi def link cheetahKeyword Define
41hi def link cheetahContinuation Special
42hi def link cheetahComment Comment
43hi def link cheetahMultiLineComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +000044
Bram Moolenaar071d4272004-06-13 20:20:40 +000045
46let b:current_syntax = "cheetah"
47