annotate runtime/syntax/cheetah.vim @ 461:f98374445f66

updated for version 7.0123
author vimboss
date Thu, 04 Aug 2005 21:29:45 +0000
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Cheetah template engine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Max Ischenko <mfi@ukr.net>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2003-05-11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Missing features:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " match invalid syntax, like bad variable ref. or unmatched closing tag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " PSP-style tags: <% .. %> (obsoleted feature)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " doc-strings and header comments (rarely used feature)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syntax case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword cheetahKeyword contained if else unless elif for in not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword cheetahKeyword contained while repeat break continue pass end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cheetahKeyword contained set del attr def global include raw echo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword cheetahKeyword contained import from extends implements
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword cheetahKeyword contained assert raise try catch finally
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match cheetahKeyword contained "\<compiler-settings\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Matches cached placeholders
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match cheetahContinuation "\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match cheetahComment "##.*$" display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region cheetahMultiLineComment start="#\*" end="\*#"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 if version >= 508 || !exists("did_cheetah_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let did_cheetah_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 HiLink cheetahPlaceHolder Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 HiLink cheetahDirective PreCondit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink cheetahKeyword Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink cheetahContinuation Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink cheetahComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink cheetahMultiLineComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 let b:current_syntax = "cheetah"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60