Mercurial > vim
annotate runtime/syntax/lite.vim @ 13749:f30ac8135299
Added tag v8.0.1746 for changeset e5244201fed6cab2fa9779a02e2121e685130322
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 21 Apr 2018 23:15:07 +0200 |
parents | 46763b01cd9a |
children | d46f974fd69e |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: lite | |
3 " Maintainer: Lutz Eymers <ixtab@polzin.com> | |
4 " URL: http://www.isp.de/data/lite.vim | |
5 " Email: Subject: send syntax_vim.tgz | |
6 " Last Change: 2001 Mai 01 | |
7 " | |
8 " Options lite_sql_query = 1 for SQL syntax highligthing inside strings | |
9 " lite_minlines = x to sync at least x lines backwards | |
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 | 13 finish |
14 endif | |
15 | |
16 if !exists("main_syntax") | |
17 let main_syntax = 'lite' | |
18 endif | |
19 | |
20 if main_syntax == 'lite' | |
21 if exists("lite_sql_query") | |
22 if lite_sql_query == 1 | |
23 syn include @liteSql <sfile>:p:h/sql.vim | |
24 unlet b:current_syntax | |
25 endif | |
26 endif | |
27 endif | |
28 | |
29 if main_syntax == 'msql' | |
30 if exists("msql_sql_query") | |
31 if msql_sql_query == 1 | |
32 syn include @liteSql <sfile>:p:h/sql.vim | |
33 unlet b:current_syntax | |
34 endif | |
35 endif | |
36 endif | |
37 | |
38 syn cluster liteSql remove=sqlString,sqlComment | |
39 | |
40 syn case match | |
41 | |
42 " Internal Variables | |
43 syn keyword liteIntVar ERRMSG contained | |
44 | |
45 " Comment | |
46 syn region liteComment start="/\*" end="\*/" contains=liteTodo | |
47 | |
48 " Function names | |
49 syn keyword liteFunctions echo printf fprintf open close read | |
50 syn keyword liteFunctions readln readtok | |
51 syn keyword liteFunctions split strseg chop tr sub substr | |
52 syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir | |
53 syn keyword liteFunctions rename truncate link symlink stat | |
54 syn keyword liteFunctions sleep system getpid getppid kill | |
55 syn keyword liteFunctions time ctime time2unixtime unixtime2year | |
56 syn keyword liteFunctions unixtime2year unixtime2month unixtime2day | |
57 syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec | |
58 syn keyword liteFunctions strftime | |
59 syn keyword liteFunctions getpwnam getpwuid | |
60 syn keyword liteFunctions gethostbyname gethostbyaddress | |
61 syn keyword liteFunctions urlEncode setContentType includeFile | |
62 syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB | |
63 syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult | |
64 syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs | |
65 syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField | |
66 syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode | |
67 syn keyword liteFunctions exit fatal typeof | |
68 syn keyword liteFunctions crypt addHttpHeader | |
69 | |
70 " Conditional | |
71 syn keyword liteConditional if else | |
72 | |
73 " Repeat | |
74 syn keyword liteRepeat while | |
75 | |
76 " Operator | |
77 syn keyword liteStatement break return continue | |
78 | |
79 " Operator | |
80 syn match liteOperator "[-+=#*]" | |
81 syn match liteOperator "/[^*]"me=e-1 | |
82 syn match liteOperator "\$" | |
83 syn match liteRelation "&&" | |
84 syn match liteRelation "||" | |
85 syn match liteRelation "[!=<>]=" | |
86 syn match liteRelation "[<>]" | |
87 | |
88 " Identifier | |
89 syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator | |
90 syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar | |
91 | |
92 " Include | |
93 syn keyword liteInclude load | |
94 | |
95 " Define | |
96 syn keyword liteDefine funct | |
97 | |
98 " Type | |
99 syn keyword liteType int uint char real | |
100 | |
101 " String | |
102 syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql | |
103 | |
104 " Number | |
105 syn match liteNumber "-\=\<\d\+\>" | |
106 | |
107 " Float | |
108 syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" | |
109 | |
110 " SpecialChar | |
111 syn match liteSpecialChar "\\[abcfnrtv\\]" contained | |
112 | |
113 syn match liteParentError "[)}\]]" | |
114 | |
115 " Todo | |
116 syn keyword liteTodo TODO Todo todo contained | |
117 | |
118 " dont syn #!... | |
119 syn match liteExec "^#!.*$" | |
120 | |
121 " Parents | |
122 syn cluster liteInside contains=liteComment,liteFunctions,liteIdentifier,liteGlobalIdentifier,liteConditional,liteRepeat,liteStatement,liteOperator,liteRelation,liteType,liteString,liteNumber,liteFloat,liteParent | |
123 | |
124 syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside | |
125 syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside | |
126 syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside | |
127 | |
128 " sync | |
129 if main_syntax == 'lite' | |
130 if exists("lite_minlines") | |
131 exec "syn sync minlines=" . lite_minlines | |
132 else | |
133 syn sync minlines=100 | |
134 endif | |
135 endif | |
136 | |
137 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
7
diff
changeset
|
138 " Only when an item doesn't have highlighting yet |
7 | 139 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
140 hi def link liteComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
141 hi def link liteString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
142 hi def link liteNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
143 hi def link liteFloat Float |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
144 hi def link liteIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
145 hi def link liteGlobalIdentifier Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
146 hi def link liteIntVar Identifier |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
147 hi def link liteFunctions Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
148 hi def link liteRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
149 hi def link liteConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
150 hi def link liteStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
151 hi def link liteType Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
152 hi def link liteInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
153 hi def link liteDefine Define |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
154 hi def link liteSpecialChar SpecialChar |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
155 hi def link liteParentError liteError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
156 hi def link liteError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
157 hi def link liteTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
158 hi def link liteOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
159 hi def link liteRelation Operator |
7 | 160 |
161 | |
162 let b:current_syntax = "lite" | |
163 | |
164 if main_syntax == 'lite' | |
165 unlet main_syntax | |
166 endif | |
167 | |
168 " vim: ts=8 |