annotate runtime/syntax/sqlinformix.vim @ 3672:5aad2c444a00 v7.3.596

updated for version 7.3.596 Problem: Can't remove all signs for a file or buffer. Solution: Support "*" for the sign id. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Tue, 10 Jul 2012 15:18:22 +0200
parents cc049b00ee70
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
1 " Vim syntax file
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
2 " Informix Structured Query Language (SQL) and Stored Procedure Language (SPL)
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
3 " Language: SQL, SPL (Informix Dynamic Server 2000 v9.2)
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
4 " Maintainer: Dean Hill <dhill@hotmail.com>
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
5 " Last Change: 2004 Aug 30
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
6
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
9 if version < 600
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
10 syntax clear
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
12 finish
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
13 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
14
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
15 syn case ignore
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
16
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
17
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
18
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
19 " === Comment syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
20 syn region sqlComment start="{" end="}" contains=sqlTodo
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
21 syn match sqlComment "--.*$" contains=sqlTodo
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
22 syn sync ccomment sqlComment
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
23
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
24
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
25
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
26 " === Constant syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
27 " = Boolean subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
28 syn keyword sqlBoolean true false
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
29 syn keyword sqlBoolean null
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
30 syn keyword sqlBoolean public user
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
31 syn keyword sqlBoolean current today
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
32 syn keyword sqlBoolean year month day hour minute second fraction
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
33
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
34 " = String subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
35 syn region sqlString start=+"+ end=+"+
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
36 syn region sqlString start=+'+ end=+'+
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
37
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
38 " = Numbers subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
39 syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
40
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
41
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
42
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
43 " === Statement syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
44 " SQL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
45 syn keyword sqlStatement allocate alter
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
46 syn keyword sqlStatement begin
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
47 syn keyword sqlStatement close commit connect create
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
48 syn keyword sqlStatement database deallocate declare delete describe disconnect drop
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
49 syn keyword sqlStatement execute fetch flush free get grant info insert
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
50 syn keyword sqlStatement load lock open output
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
51 syn keyword sqlStatement prepare put
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
52 syn keyword sqlStatement rename revoke rollback select set start stop
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
53 syn keyword sqlStatement truncate unload unlock update
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
54 syn keyword sqlStatement whenever
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
55 " SPL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
56 syn keyword sqlStatement call continue define
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
57 syn keyword sqlStatement exit
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
58 syn keyword sqlStatement let
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
59 syn keyword sqlStatement return system trace
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
60
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
61 " = Conditional subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
62 " SPL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
63 syn keyword sqlConditional elif else if then
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
64 syn keyword sqlConditional case
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
65 " Highlight "end if" with one or more separating spaces
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
66 syn match sqlConditional "end \+if"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
67
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
68 " = Repeat subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
69 " SQL/SPL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
70 " Handle SQL triggers' "for each row" clause and SPL "for" loop
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
71 syn match sqlRepeat "for\( \+each \+row\)\="
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
72 " SPL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
73 syn keyword sqlRepeat foreach while
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
74 " Highlight "end for", etc. with one or more separating spaces
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
75 syn match sqlRepeat "end \+for"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
76 syn match sqlRepeat "end \+foreach"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
77 syn match sqlRepeat "end \+while"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
78
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
79 " = Exception subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
80 " SPL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
81 syn match sqlException "on \+exception"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
82 syn match sqlException "end \+exception"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
83 syn match sqlException "end \+exception \+with \+resume"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
84 syn match sqlException "raise \+exception"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
85
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
86 " = Keyword subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
87 " SQL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
88 syn keyword sqlKeyword aggregate add as authorization autofree by
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
89 syn keyword sqlKeyword cache cascade check cluster collation
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
90 syn keyword sqlKeyword column connection constraint cross
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
91 syn keyword sqlKeyword dataskip debug default deferred_prepare
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
92 syn keyword sqlKeyword descriptor diagnostics
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
93 syn keyword sqlKeyword each escape explain external
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
94 syn keyword sqlKeyword file foreign fragment from function
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
95 syn keyword sqlKeyword group having
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
96 syn keyword sqlKeyword immediate index inner into isolation
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
97 syn keyword sqlKeyword join key
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
98 syn keyword sqlKeyword left level log
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
99 syn keyword sqlKeyword mode modify mounting new no
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
100 syn keyword sqlKeyword object of old optical option
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
101 syn keyword sqlKeyword optimization order outer
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
102 syn keyword sqlKeyword pdqpriority pload primary procedure
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
103 syn keyword sqlKeyword references referencing release reserve
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
104 syn keyword sqlKeyword residency right role routine row
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
105 syn keyword sqlKeyword schedule schema scratch session set
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
106 syn keyword sqlKeyword statement statistics synonym
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
107 syn keyword sqlKeyword table temp temporary timeout to transaction trigger
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
108 syn keyword sqlKeyword using values view violations
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
109 syn keyword sqlKeyword where with work
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
110 " Highlight "on" (if it's not followed by some words we've already handled)
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
111 syn match sqlKeyword "on \+\(exception\)\@!"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
112 " SPL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
113 " Highlight "end" (if it's not followed by some words we've already handled)
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
114 syn match sqlKeyword "end \+\(if\|for\|foreach\|while\|exception\)\@!"
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
115 syn keyword sqlKeyword resume returning
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
116
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
117 " = Operator subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
118 " SQL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
119 syn keyword sqlOperator not and or
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
120 syn keyword sqlOperator in is any some all between exists
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
121 syn keyword sqlOperator like matches
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
122 syn keyword sqlOperator union intersect
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
123 syn keyword sqlOperator distinct unique
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
124
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
125
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
126
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
127 " === Identifier syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
128 " = Function subgroup =
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
129 " SQL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
130 syn keyword sqlFunction abs acos asin atan atan2 avg
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
131 syn keyword sqlFunction cardinality cast char_length character_length cos count
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
132 syn keyword sqlFunction exp filetoblob filetoclob hex
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
133 syn keyword sqlFunction initcap length logn log10 lower lpad
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
134 syn keyword sqlFunction min max mod octet_length pow range replace root round rpad
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
135 syn keyword sqlFunction sin sqrt stdev substr substring sum
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
136 syn keyword sqlFunction to_char tan to_date trim trunc upper variance
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
137
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
138
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
139
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
140 " === Type syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
141 " SQL
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
142 syn keyword sqlType blob boolean byte char character clob
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
143 syn keyword sqlType date datetime dec decimal double
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
144 syn keyword sqlType float int int8 integer interval list lvarchar
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
145 syn keyword sqlType money multiset nchar numeric nvarchar
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
146 syn keyword sqlType real serial serial8 smallfloat smallint
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
147 syn keyword sqlType text varchar varying
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
148
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
149
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
150
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
151 " === Todo syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
152 syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
153
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
154
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
155
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
156 " Define the default highlighting.
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
157 " For version 5.7 and earlier: only when not done already
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
158 " For version 5.8 and later: only when an item doesn't have highlighting yet
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
159 if version >= 508 || !exists("did_sql_syn_inits")
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
160 if version < 508
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
161 let did_sql_syn_inits = 1
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
162 command -nargs=+ HiLink hi link <args>
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
163 else
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
164 command -nargs=+ HiLink hi def link <args>
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
165 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
166
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
167
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
168 " === Comment syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
169 HiLink sqlComment Comment
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
170
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
171 " === Constant syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
172 HiLink sqlNumber Number
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
173 HiLink sqlBoolean Boolean
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
174 HiLink sqlString String
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
175
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
176 " === Statment syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
177 HiLink sqlStatement Statement
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
178 HiLink sqlConditional Conditional
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
179 HiLink sqlRepeat Repeat
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
180 HiLink sqlKeyword Keyword
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
181 HiLink sqlOperator Operator
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
182 HiLink sqlException Exception
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
183
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
184 " === Identifier syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
185 HiLink sqlFunction Function
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
186
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
187 " === Type syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
188 HiLink sqlType Type
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
189
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
190 " === Todo syntax group ===
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
191 HiLink sqlTodo Todo
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
192
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
193 delcommand HiLink
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
194 endif
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
195
cc049b00ee70 updated for version 7.0014
vimboss
parents:
diff changeset
196 let b:current_syntax = "sqlinformix"