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
8 " Options lite_sql_query = 1 for SQL syntax highligthing inside strings
9 " lite_minlines = x to sync at least x lines backwards
11 " For version 5.x: Clear all syntax items
12 " For version 6.x: Quit when a syntax file was already loaded
15 elseif exists("b:current_syntax")
19 if !exists("main_syntax")
20 let main_syntax = 'lite'
23 if main_syntax == 'lite'
24 if exists("lite_sql_query")
25 if lite_sql_query == 1
26 syn include @liteSql <sfile>:p:h/sql.vim
27 unlet b:current_syntax
32 if main_syntax == 'msql'
33 if exists("msql_sql_query")
34 if msql_sql_query == 1
35 syn include @liteSql <sfile>:p:h/sql.vim
36 unlet b:current_syntax
41 syn cluster liteSql remove=sqlString,sqlComment
46 syn keyword liteIntVar ERRMSG contained
49 syn region liteComment start="/\*" end="\*/" contains=liteTodo
52 syn keyword liteFunctions echo printf fprintf open close read
53 syn keyword liteFunctions readln readtok
54 syn keyword liteFunctions split strseg chop tr sub substr
55 syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir
56 syn keyword liteFunctions rename truncate link symlink stat
57 syn keyword liteFunctions sleep system getpid getppid kill
58 syn keyword liteFunctions time ctime time2unixtime unixtime2year
59 syn keyword liteFunctions unixtime2year unixtime2month unixtime2day
60 syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec
61 syn keyword liteFunctions strftime
62 syn keyword liteFunctions getpwnam getpwuid
63 syn keyword liteFunctions gethostbyname gethostbyaddress
64 syn keyword liteFunctions urlEncode setContentType includeFile
65 syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB
66 syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult
67 syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs
68 syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField
69 syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode
70 syn keyword liteFunctions exit fatal typeof
71 syn keyword liteFunctions crypt addHttpHeader
74 syn keyword liteConditional if else
77 syn keyword liteRepeat while
80 syn keyword liteStatement break return continue
83 syn match liteOperator "[-+=#*]"
84 syn match liteOperator "/[^*]"me=e-1
85 syn match liteOperator "\$"
86 syn match liteRelation "&&"
87 syn match liteRelation "||"
88 syn match liteRelation "[!=<>]="
89 syn match liteRelation "[<>]"
92 syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator
93 syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar
96 syn keyword liteInclude load
99 syn keyword liteDefine funct
102 syn keyword liteType int uint char real
105 syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql
108 syn match liteNumber "-\=\<\d\+\>"
111 syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>"
114 syn match liteSpecialChar "\\[abcfnrtv\\]" contained
116 syn match liteParentError "[)}\]]"
119 syn keyword liteTodo TODO Todo todo contained
122 syn match liteExec "^#!.*$"
125 syn cluster liteInside contains=liteComment,liteFunctions,liteIdentifier,liteGlobalIdentifier,liteConditional,liteRepeat,liteStatement,liteOperator,liteRelation,liteType,liteString,liteNumber,liteFloat,liteParent
127 syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside
128 syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside
129 syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside
132 if main_syntax == 'lite'
133 if exists("lite_minlines")
134 exec "syn sync minlines=" . lite_minlines
136 syn sync minlines=100
140 " Define the default highlighting.
141 " For version 5.7 and earlier: only when not done already
142 " For version 5.8 and later: only when an item doesn't have highlighting yet
143 if version >= 508 || !exists("did_lite_syn_inits")
145 let did_lite_syn_inits = 1
146 command -nargs=+ HiLink hi link <args>
148 command -nargs=+ HiLink hi def link <args>
151 HiLink liteComment Comment
152 HiLink liteString String
153 HiLink liteNumber Number
154 HiLink liteFloat Float
155 HiLink liteIdentifier Identifier
156 HiLink liteGlobalIdentifier Identifier
157 HiLink liteIntVar Identifier
158 HiLink liteFunctions Function
159 HiLink liteRepeat Repeat
160 HiLink liteConditional Conditional
161 HiLink liteStatement Statement
163 HiLink liteInclude Include
164 HiLink liteDefine Define
165 HiLink liteSpecialChar SpecialChar
166 HiLink liteParentError liteError
167 HiLink liteError Error
169 HiLink liteOperator Operator
170 HiLink liteRelation Operator
175 let b:current_syntax = "lite"
177 if main_syntax == 'lite'