comparison runtime/syntax/cheetah.vim @ 7:3fc0f57ecb91 v7.0001

updated for version 7.0001
author vimboss
date Sun, 13 Jun 2004 20:20:40 +0000
parents
children 43efa4f5a8ea
comparison
equal deleted inserted replaced
6:c2daee826b8f 7:3fc0f57ecb91
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 " For version 5.x: Clear all syntax items
12 " For version 6.x: Quit when a syntax file was already loaded
13 if version < 600
14 syntax clear
15 elseif exists("b:current_syntax")
16 finish
17 endif
18
19 syntax case match
20
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\>"
28
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
33
34 syn match cheetahContinuation "\\$"
35 syn match cheetahComment "##.*$" display
36 syn region cheetahMultiLineComment start="#\*" end="\*#"
37
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")
42 if version < 508
43 let did_cheetah_syn_inits = 1
44 command -nargs=+ HiLink hi link <args>
45 else
46 command -nargs=+ HiLink hi def link <args>
47 endif
48
49 HiLink cheetahPlaceHolder Identifier
50 HiLink cheetahDirective PreCondit
51 HiLink cheetahKeyword Define
52 HiLink cheetahContinuation Special
53 HiLink cheetahComment Comment
54 HiLink cheetahMultiLineComment Comment
55
56 delcommand HiLink
57 endif
58
59 let b:current_syntax = "cheetah"
60