blob: c1860def3c8df2da20d14df80a133da96469a4a2 [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
37command -nargs=+ HiLink hi def link <args>
Bram Moolenaar071d4272004-06-13 20:20:40 +000038
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020039HiLink cheetahPlaceHolder Identifier
40HiLink cheetahDirective PreCondit
41HiLink cheetahKeyword Define
42HiLink cheetahContinuation Special
43HiLink cheetahComment Comment
44HiLink cheetahMultiLineComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +000045
Bram Moolenaar89bcfda2016-08-30 23:26:57 +020046delcommand HiLink
Bram Moolenaar071d4272004-06-13 20:20:40 +000047
48let b:current_syntax = "cheetah"
49