annotate runtime/syntax/latte.vim @ 9260:ac8180818504 v7.4.1913

commit https://github.com/vim/vim/commit/1610d052413e0ed664498853a47acc2d677a22d1 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 9 22:53:01 2016 +0200 patch 7.4.1913 Problem: When ":doautocmd" is used modelines are used even when no autocommands were executed. (Daniel Hahler) Solution: Skip processing modelines. (closes https://github.com/vim/vim/issues/854)
author Christian Brabandt <cb@256bit.org>
date Thu, 09 Jun 2016 23:00:05 +0200
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: Latte
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Nick Moffitt, <nick@zork.net>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 14 June, 2000
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Notes:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " I based this on the TeX and Scheme syntax files (but mostly scheme).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " See http://www.latte.org for info on the language.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match latteError "[{}\\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match latteOther "\\{"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn match latteOther "\\}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match latteOther "\\\\"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 set iskeyword=33,43,45,48-57,63,65-90,95,97-122,_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn region latteString start=+\\"+ skip=+\\\\"+ end=+\\"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn region latteGroup matchgroup=Delimiter start="{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn region latteUnquote matchgroup=Delimiter start="\\,{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn region latteSplice matchgroup=Delimiter start="\\,@{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn region latteQuote matchgroup=Delimiter start="\\'{" skip="\\[{}]" matchgroup=Delimiter end="}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn region latteQuote matchgroup=Delimiter start="\\`{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=latteUnquote,latteSplice
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match latteOperator '\\/'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match latteOperator '='
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match latteComment "\\;.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " This was gathered by slurping in the index.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword latteSyntax __FILE__ __latte-version__ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword latteSyntax _bal-tag _pre _tag add and append apply back contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword latteSyntax caar cadr car cdar cddr cdr ceil compose contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword latteSyntax concat cons def defmacro divide downcase contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword latteSyntax empty? equal? error explode file-contents contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword latteSyntax floor foreach front funcall ge? getenv contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword latteSyntax greater-equal? greater? group group? gt? html contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword latteSyntax if include lambda le? length less-equal? contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword latteSyntax less? let lmap load-file load-library lt? macro contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword latteSyntax member? modulo multiply not nth operator? contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword latteSyntax or ordinary quote process-output push-back contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword latteSyntax push-front quasiquote quote random rdc reverse contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword latteSyntax set! snoc splicing unquote strict-html4 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword latteSyntax string-append string-ge? string-greater-equal? contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword latteSyntax string-greater? string-gt? string-le? contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword latteSyntax string-less-equal? string-less? string-lt? contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword latteSyntax string? subseq substr subtract contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword latteSyntax upcase useless warn while zero? contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " If it's good enough for scheme...
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn sync match matchPlace grouphere NONE "^[^ \t]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " ... i.e. synchronize on a line that starts at the left margin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 " 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
75 if version >= 508 || !exists("did_latte_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 let did_latte_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink latteSyntax Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink latteVar Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink latteString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink latteQuote String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink latteDelimiter Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink latteOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink latteComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink latteError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 let b:current_syntax = "latte"