annotate runtime/syntax/cheetah.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents 3fc0f57ecb91
children 46763b01cd9a
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
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
11 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
12 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syntax case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword cheetahKeyword contained if else unless elif for in not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword cheetahKeyword contained while repeat break continue pass end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword cheetahKeyword contained set del attr def global include raw echo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn keyword cheetahKeyword contained import from extends implements
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword cheetahKeyword contained assert raise try catch finally
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match cheetahKeyword contained "\<compiler-settings\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Matches cached placeholders
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match cheetahContinuation "\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match cheetahComment "##.*$" display
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn region cheetahMultiLineComment start="#\*" end="\*#"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
36 " Only when an item doesn't have highlighting yet
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
37 command -nargs=+ HiLink hi def link <args>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
39 HiLink cheetahPlaceHolder Identifier
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
40 HiLink cheetahDirective PreCondit
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
41 HiLink cheetahKeyword Define
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
42 HiLink cheetahContinuation Special
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
43 HiLink cheetahComment Comment
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
44 HiLink cheetahMultiLineComment Comment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
46 delcommand HiLink
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 let b:current_syntax = "cheetah"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49