831
|
1 " stata.vim -- Vim syntax file for Stata do, ado, and class files.
|
|
2 " Language: Stata and/or Mata
|
|
3 " Maintainer: Jeff Pitblado <jpitblado@stata.com>
|
|
4 " Last Change: 14apr2006
|
|
5 " Version: 1.1.1
|
|
6 " Location: http://www.stata.com/users/jpitblado/files/vimfiles/syntax/stata.vim
|
|
7
|
|
8 " Log:
|
|
9 " 14apr2006 renamed syntax groups st* to stata*
|
|
10 " 'syntax clear' only under version control
|
|
11 " check for 'b:current_syntax', removed 'did_stat_syntax_inits'
|
|
12
|
|
13 if version < 600
|
|
14 syntax clear
|
|
15 elseif exists("b:current_syntax")
|
|
16 finish
|
|
17 endif
|
|
18
|
|
19 syntax case match
|
|
20
|
|
21 " comments - single line
|
|
22 " note that the triple slash continuing line comment comes free
|
|
23 syn region stataStarComment start=/^\s*\*/ end=/$/ contains=stataComment oneline
|
|
24 syn region stataSlashComment start="\s//" end=/$/ contains=stataComment oneline
|
|
25 syn region stataSlashComment start="^//" end=/$/ contains=stataComment oneline
|
|
26 " comments - multiple line
|
|
27 syn region stataComment start="/\*" end="\*/" contains=stataComment
|
|
28
|
|
29 " global macros - simple case
|
|
30 syn match stataGlobal /\$\a\w*/
|
|
31 " global macros - general case
|
|
32 syn region stataGlobal start=/\${/ end=/}/ oneline contains=@stataMacroGroup
|
|
33 " local macros - general case
|
|
34 syn region stataLocal start=/`/ end=/'/ oneline contains=@stataMacroGroup
|
|
35
|
|
36 " numeric formats
|
|
37 syn match stataFormat /%-\=\d\+\.\d\+[efg]c\=/
|
|
38 " numeric hex format
|
|
39 syn match stataFormat /%-\=21x/
|
|
40 " string format
|
|
41 syn match stataFormat /%\(\|-\|\~\)\d\+s/
|
|
42
|
|
43 " Statements
|
|
44 syn keyword stataConditional else if
|
|
45 syn keyword stataRepeat foreach
|
|
46 syn keyword stataRepeat forv[alues]
|
|
47 syn keyword stataRepeat while
|
|
48
|
|
49 " Common programming commands
|
|
50 syn keyword stataCommand about
|
|
51 syn keyword stataCommand adopath
|
|
52 syn keyword stataCommand adoupdate
|
|
53 syn keyword stataCommand assert
|
|
54 syn keyword stataCommand break
|
|
55 syn keyword stataCommand by
|
|
56 syn keyword stataCommand cap[ture]
|
|
57 syn keyword stataCommand cd
|
|
58 syn keyword stataCommand chdir
|
|
59 syn keyword stataCommand checksum
|
|
60 syn keyword stataCommand class
|
|
61 syn keyword stataCommand classutil
|
|
62 syn keyword stataCommand compress
|
|
63 syn keyword stataCommand conf[irm]
|
|
64 syn keyword stataCommand conren
|
|
65 syn keyword stataCommand continue
|
|
66 syn keyword stataCommand cou[nt]
|
|
67 syn keyword stataCommand cscript
|
|
68 syn keyword stataCommand cscript_log
|
|
69 syn keyword stataCommand #delimit
|
|
70 syn keyword stataCommand d[escribe]
|
|
71 syn keyword stataCommand dir
|
|
72 syn keyword stataCommand discard
|
|
73 syn keyword stataCommand di[splay]
|
|
74 syn keyword stataCommand do
|
|
75 syn keyword stataCommand doedit
|
|
76 syn keyword stataCommand drop
|
|
77 syn keyword stataCommand edit
|
|
78 syn keyword stataCommand end
|
|
79 syn keyword stataCommand erase
|
|
80 syn keyword stataCommand eret[urn]
|
|
81 syn keyword stataCommand err[or]
|
|
82 syn keyword stataCommand e[xit]
|
|
83 syn keyword stataCommand expand
|
|
84 syn keyword stataCommand expandcl
|
|
85 syn keyword stataCommand file
|
|
86 syn keyword stataCommand findfile
|
|
87 syn keyword stataCommand format
|
|
88 syn keyword stataCommand g[enerate]
|
|
89 syn keyword stataCommand gettoken
|
|
90 syn keyword stataCommand gl[obal]
|
|
91 syn keyword stataCommand help
|
|
92 syn keyword stataCommand hexdump
|
|
93 syn keyword stataCommand include
|
|
94 syn keyword stataCommand infile
|
|
95 syn keyword stataCommand infix
|
|
96 syn keyword stataCommand input
|
|
97 syn keyword stataCommand insheet
|
|
98 syn keyword stataCommand joinby
|
|
99 syn keyword stataCommand la[bel]
|
|
100 syn keyword stataCommand levelsof
|
|
101 syn keyword stataCommand list
|
|
102 syn keyword stataCommand loc[al]
|
|
103 syn keyword stataCommand log
|
|
104 syn keyword stataCommand ma[cro]
|
|
105 syn keyword stataCommand mark
|
|
106 syn keyword stataCommand markout
|
|
107 syn keyword stataCommand marksample
|
|
108 syn keyword stataCommand mata
|
|
109 syn keyword stataCommand matrix
|
|
110 syn keyword stataCommand memory
|
|
111 syn keyword stataCommand merge
|
|
112 syn keyword stataCommand mkdir
|
|
113 syn keyword stataCommand more
|
|
114 syn keyword stataCommand net
|
|
115 syn keyword stataCommand nobreak
|
|
116 syn keyword stataCommand n[oisily]
|
|
117 syn keyword stataCommand note[s]
|
|
118 syn keyword stataCommand numlist
|
|
119 syn keyword stataCommand outfile
|
|
120 syn keyword stataCommand outsheet
|
|
121 syn keyword stataCommand _parse
|
|
122 syn keyword stataCommand pause
|
|
123 syn keyword stataCommand plugin
|
|
124 syn keyword stataCommand post
|
|
125 syn keyword stataCommand postclose
|
|
126 syn keyword stataCommand postfile
|
|
127 syn keyword stataCommand preserve
|
|
128 syn keyword stataCommand print
|
|
129 syn keyword stataCommand printer
|
|
130 syn keyword stataCommand profiler
|
|
131 syn keyword stataCommand pr[ogram]
|
|
132 syn keyword stataCommand q[uery]
|
|
133 syn keyword stataCommand qui[etly]
|
|
134 syn keyword stataCommand rcof
|
|
135 syn keyword stataCommand reg[ress]
|
|
136 syn keyword stataCommand rename
|
|
137 syn keyword stataCommand repeat
|
|
138 syn keyword stataCommand replace
|
|
139 syn keyword stataCommand reshape
|
|
140 syn keyword stataCommand ret[urn]
|
|
141 syn keyword stataCommand _rmcoll
|
|
142 syn keyword stataCommand _rmcoll
|
|
143 syn keyword stataCommand _rmcollright
|
|
144 syn keyword stataCommand rmdir
|
|
145 syn keyword stataCommand _robust
|
|
146 syn keyword stataCommand save
|
|
147 syn keyword stataCommand sca[lar]
|
|
148 syn keyword stataCommand search
|
|
149 syn keyword stataCommand serset
|
|
150 syn keyword stataCommand set
|
|
151 syn keyword stataCommand shell
|
|
152 syn keyword stataCommand sleep
|
|
153 syn keyword stataCommand sort
|
|
154 syn keyword stataCommand split
|
|
155 syn keyword stataCommand sret[urn]
|
|
156 syn keyword stataCommand ssc
|
|
157 syn keyword stataCommand su[mmarize]
|
|
158 syn keyword stataCommand syntax
|
|
159 syn keyword stataCommand sysdescribe
|
|
160 syn keyword stataCommand sysdir
|
|
161 syn keyword stataCommand sysuse
|
|
162 syn keyword stataCommand token[ize]
|
|
163 syn keyword stataCommand translate
|
|
164 syn keyword stataCommand type
|
|
165 syn keyword stataCommand unab
|
|
166 syn keyword stataCommand unabcmd
|
|
167 syn keyword stataCommand update
|
|
168 syn keyword stataCommand use
|
|
169 syn keyword stataCommand vers[ion]
|
|
170 syn keyword stataCommand view
|
|
171 syn keyword stataCommand viewsource
|
|
172 syn keyword stataCommand webdescribe
|
|
173 syn keyword stataCommand webseek
|
|
174 syn keyword stataCommand webuse
|
|
175 syn keyword stataCommand which
|
|
176 syn keyword stataCommand who
|
|
177 syn keyword stataCommand window
|
|
178
|
|
179 " Literals
|
|
180 syn match stataQuote /"/
|
|
181 syn region stataEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=@stataMacroGroup,stataQuote,stataString,stataEString
|
|
182 syn region stataString matchgroup=Nothing start=/"/ end=/"/ oneline contains=@stataMacroGroup
|
|
183
|
|
184 " define clusters
|
|
185 syn cluster stataFuncGroup contains=@stataMacroGroup,stataFunc,stataString,stataEstring
|
|
186 syn cluster stataMacroGroup contains=stataGlobal,stataLocal
|
|
187 syn cluster stataParenGroup contains=stataParenError,stataBracketError,stataBraceError,stataSpecial,stataFormat
|
|
188
|
|
189 " Stata functions
|
|
190 " Math
|
|
191 syn region stataFunc matchgroup=Function start=/abs(/ end=/)/ contains=@stataFuncGroup
|
|
192 syn region stataFunc matchgroup=Function start=/acos(/ end=/)/ contains=@stataFuncGroup
|
|
193 syn region stataFunc matchgroup=Function start=/asin(/ end=/)/ contains=@stataFuncGroup
|
|
194 syn region stataFunc matchgroup=Function start=/atan(/ end=/)/ contains=@stataFuncGroup
|
|
195 syn region stataFunc matchgroup=Function start=/atan2(/ end=/)/ contains=@stataFuncGroup
|
|
196 syn region stataFunc matchgroup=Function start=/atanh(/ end=/)/ contains=@stataFuncGroup
|
|
197 syn region stataFunc matchgroup=Function start=/ceil(/ end=/)/ contains=@stataFuncGroup
|
|
198 syn region stataFunc matchgroup=Function start=/cloglog(/ end=/)/ contains=@stataFuncGroup
|
|
199 syn region stataFunc matchgroup=Function start=/comb(/ end=/)/ contains=@stataFuncGroup
|
|
200 syn region stataFunc matchgroup=Function start=/cos(/ end=/)/ contains=@stataFuncGroup
|
|
201 syn region stataFunc matchgroup=Function start=/digamma(/ end=/)/ contains=@stataFuncGroup
|
|
202 syn region stataFunc matchgroup=Function start=/exp(/ end=/)/ contains=@stataFuncGroup
|
|
203 syn region stataFunc matchgroup=Function start=/floor(/ end=/)/ contains=@stataFuncGroup
|
|
204 syn region stataFunc matchgroup=Function start=/int(/ end=/)/ contains=@stataFuncGroup
|
|
205 syn region stataFunc matchgroup=Function start=/invcloglog(/ end=/)/ contains=@stataFuncGroup
|
|
206 syn region stataFunc matchgroup=Function start=/invlogit(/ end=/)/ contains=@stataFuncGroup
|
|
207 syn region stataFunc matchgroup=Function start=/ln(/ end=/)/ contains=@stataFuncGroup
|
|
208 syn region stataFunc matchgroup=Function start=/lnfact(/ end=/)/ contains=@stataFuncGroup
|
|
209 syn region stataFunc matchgroup=Function start=/lnfactorial(/ end=/)/ contains=@stataFuncGroup
|
|
210 syn region stataFunc matchgroup=Function start=/lngamma(/ end=/)/ contains=@stataFuncGroup
|
|
211 syn region stataFunc matchgroup=Function start=/log(/ end=/)/ contains=@stataFuncGroup
|
|
212 syn region stataFunc matchgroup=Function start=/log10(/ end=/)/ contains=@stataFuncGroup
|
|
213 syn region stataFunc matchgroup=Function start=/logit(/ end=/)/ contains=@stataFuncGroup
|
|
214 syn region stataFunc matchgroup=Function start=/max(/ end=/)/ contains=@stataFuncGroup
|
|
215 syn region stataFunc matchgroup=Function start=/mod(/ end=/)/ contains=@stataFuncGroup
|
|
216 syn region stataFunc matchgroup=Function start=/reldif(/ end=/)/ contains=@stataFuncGroup
|
|
217 syn region stataFunc matchgroup=Function start=/round(/ end=/)/ contains=@stataFuncGroup
|
|
218 syn region stataFunc matchgroup=Function start=/sign(/ end=/)/ contains=@stataFuncGroup
|
|
219 syn region stataFunc matchgroup=Function start=/sin(/ end=/)/ contains=@stataFuncGroup
|
|
220 syn region stataFunc matchgroup=Function start=/sqrt(/ end=/)/ contains=@stataFuncGroup
|
|
221 syn region stataFunc matchgroup=Function start=/sum(/ end=/)/ contains=@stataFuncGroup
|
|
222 syn region stataFunc matchgroup=Function start=/tan(/ end=/)/ contains=@stataFuncGroup
|
|
223 syn region stataFunc matchgroup=Function start=/tanh(/ end=/)/ contains=@stataFuncGroup
|
|
224 syn region stataFunc matchgroup=Function start=/trigamma(/ end=/)/ contains=@stataFuncGroup
|
|
225 syn region stataFunc matchgroup=Function start=/trunc(/ end=/)/ contains=@stataFuncGroup
|
|
226 " Probability distriubtions and density functions
|
|
227 syn region stataFunc matchgroup=Function start=/betaden(/ end=/)/ contains=@stataFuncGroup
|
|
228 syn region stataFunc matchgroup=Function start=/Binomial(/ end=/)/ contains=@stataFuncGroup
|
|
229 syn region stataFunc matchgroup=Function start=/binorm(/ end=/)/ contains=@stataFuncGroup
|
|
230 syn region stataFunc matchgroup=Function start=/binormal(/ end=/)/ contains=@stataFuncGroup
|
|
231 syn region stataFunc matchgroup=Function start=/chi2(/ end=/)/ contains=@stataFuncGroup
|
|
232 syn region stataFunc matchgroup=Function start=/chi2tail(/ end=/)/ contains=@stataFuncGroup
|
|
233 syn region stataFunc matchgroup=Function start=/dgammapda(/ end=/)/ contains=@stataFuncGroup
|
|
234 syn region stataFunc matchgroup=Function start=/dgammapdada(/ end=/)/ contains=@stataFuncGroup
|
|
235 syn region stataFunc matchgroup=Function start=/dgammapdadx(/ end=/)/ contains=@stataFuncGroup
|
|
236 syn region stataFunc matchgroup=Function start=/dgammapdx(/ end=/)/ contains=@stataFuncGroup
|
|
237 syn region stataFunc matchgroup=Function start=/dgammapdxdx(/ end=/)/ contains=@stataFuncGroup
|
|
238 syn region stataFunc matchgroup=Function start=/F(/ end=/)/ contains=@stataFuncGroup
|
|
239 syn region stataFunc matchgroup=Function start=/Fden(/ end=/)/ contains=@stataFuncGroup
|
|
240 syn region stataFunc matchgroup=Function start=/Ftail(/ end=/)/ contains=@stataFuncGroup
|
|
241 syn region stataFunc matchgroup=Function start=/gammaden(/ end=/)/ contains=@stataFuncGroup
|
|
242 syn region stataFunc matchgroup=Function start=/gammap(/ end=/)/ contains=@stataFuncGroup
|
|
243 syn region stataFunc matchgroup=Function start=/ibeta(/ end=/)/ contains=@stataFuncGroup
|
|
244 syn region stataFunc matchgroup=Function start=/invbinomial(/ end=/)/ contains=@stataFuncGroup
|
|
245 syn region stataFunc matchgroup=Function start=/invchi2(/ end=/)/ contains=@stataFuncGroup
|
|
246 syn region stataFunc matchgroup=Function start=/invchi2tail(/ end=/)/ contains=@stataFuncGroup
|
|
247 syn region stataFunc matchgroup=Function start=/invF(/ end=/)/ contains=@stataFuncGroup
|
|
248 syn region stataFunc matchgroup=Function start=/invFtail(/ end=/)/ contains=@stataFuncGroup
|
|
249 syn region stataFunc matchgroup=Function start=/invgammap(/ end=/)/ contains=@stataFuncGroup
|
|
250 syn region stataFunc matchgroup=Function start=/invibeta(/ end=/)/ contains=@stataFuncGroup
|
|
251 syn region stataFunc matchgroup=Function start=/invnchi2(/ end=/)/ contains=@stataFuncGroup
|
|
252 syn region stataFunc matchgroup=Function start=/invFtail(/ end=/)/ contains=@stataFuncGroup
|
|
253 syn region stataFunc matchgroup=Function start=/invibeta(/ end=/)/ contains=@stataFuncGroup
|
|
254 syn region stataFunc matchgroup=Function start=/invnorm(/ end=/)/ contains=@stataFuncGroup
|
|
255 syn region stataFunc matchgroup=Function start=/invnormal(/ end=/)/ contains=@stataFuncGroup
|
|
256 syn region stataFunc matchgroup=Function start=/invttail(/ end=/)/ contains=@stataFuncGroup
|
|
257 syn region stataFunc matchgroup=Function start=/lnnormal(/ end=/)/ contains=@stataFuncGroup
|
|
258 syn region stataFunc matchgroup=Function start=/lnnormalden(/ end=/)/ contains=@stataFuncGroup
|
|
259 syn region stataFunc matchgroup=Function start=/nbetaden(/ end=/)/ contains=@stataFuncGroup
|
|
260 syn region stataFunc matchgroup=Function start=/nchi2(/ end=/)/ contains=@stataFuncGroup
|
|
261 syn region stataFunc matchgroup=Function start=/nFden(/ end=/)/ contains=@stataFuncGroup
|
|
262 syn region stataFunc matchgroup=Function start=/nFtail(/ end=/)/ contains=@stataFuncGroup
|
|
263 syn region stataFunc matchgroup=Function start=/nibeta(/ end=/)/ contains=@stataFuncGroup
|
|
264 syn region stataFunc matchgroup=Function start=/norm(/ end=/)/ contains=@stataFuncGroup
|
|
265 syn region stataFunc matchgroup=Function start=/normal(/ end=/)/ contains=@stataFuncGroup
|
|
266 syn region stataFunc matchgroup=Function start=/normalden(/ end=/)/ contains=@stataFuncGroup
|
|
267 syn region stataFunc matchgroup=Function start=/normden(/ end=/)/ contains=@stataFuncGroup
|
|
268 syn region stataFunc matchgroup=Function start=/npnchi2(/ end=/)/ contains=@stataFuncGroup
|
|
269 syn region stataFunc matchgroup=Function start=/tden(/ end=/)/ contains=@stataFuncGroup
|
|
270 syn region stataFunc matchgroup=Function start=/ttail(/ end=/)/ contains=@stataFuncGroup
|
|
271 " Random numbers
|
|
272 syn region stataFunc matchgroup=Function start=/uniform(/ end=/)/ contains=@stataFuncGroup
|
|
273 " String
|
|
274 syn region stataFunc matchgroup=Function start=/abbrev(/ end=/)/ contains=@stataFuncGroup
|
|
275 syn region stataFunc matchgroup=Function start=/hchar(/ end=/)/ contains=@stataFuncGroup
|
|
276 syn region stataFunc matchgroup=Function start=/indexnot(/ end=/)/ contains=@stataFuncGroup
|
|
277 syn region stataFunc matchgroup=Function start=/itrim(/ end=/)/ contains=@stataFuncGroup
|
|
278 syn region stataFunc matchgroup=Function start=/length(/ end=/)/ contains=@stataFuncGroup
|
|
279 syn region stataFunc matchgroup=Function start=/lower(/ end=/)/ contains=@stataFuncGroup
|
|
280 syn region stataFunc matchgroup=Function start=/ltrim(/ end=/)/ contains=@stataFuncGroup
|
|
281 syn region stataFunc matchgroup=Function start=/plural(/ end=/)/ contains=@stataFuncGroup
|
|
282 syn region stataFunc matchgroup=Function start=/proper(/ end=/)/ contains=@stataFuncGroup
|
|
283 syn region stataFunc matchgroup=Function start=/real(/ end=/)/ contains=@stataFuncGroup
|
|
284 syn region stataFunc matchgroup=Function start=/regexm(/ end=/)/ contains=@stataFuncGroup
|
|
285 syn region stataFunc matchgroup=Function start=/regexr(/ end=/)/ contains=@stataFuncGroup
|
|
286 syn region stataFunc matchgroup=Function start=/regexs(/ end=/)/ contains=@stataFuncGroup
|
|
287 syn region stataFunc matchgroup=Function start=/reverse(/ end=/)/ contains=@stataFuncGroup
|
|
288 syn region stataFunc matchgroup=Function start=/rtrim(/ end=/)/ contains=@stataFuncGroup
|
|
289 syn region stataFunc matchgroup=Function start=/string(/ end=/)/ contains=@stataFuncGroup
|
|
290 syn region stataFunc matchgroup=Function start=/strlen(/ end=/)/ contains=@stataFuncGroup
|
|
291 syn region stataFunc matchgroup=Function start=/strmatch(/ end=/)/ contains=@stataFuncGroup
|
|
292 syn region stataFunc matchgroup=Function start=/strpos(/ end=/)/ contains=@stataFuncGroup
|
|
293 syn region stataFunc matchgroup=Function start=/subinstr(/ end=/)/ contains=@stataFuncGroup
|
|
294 syn region stataFunc matchgroup=Function start=/subinword(/ end=/)/ contains=@stataFuncGroup
|
|
295 syn region stataFunc matchgroup=Function start=/substr(/ end=/)/ contains=@stataFuncGroup
|
|
296 syn region stataFunc matchgroup=Function start=/trim(/ end=/)/ contains=@stataFuncGroup
|
|
297 syn region stataFunc matchgroup=Function start=/upper(/ end=/)/ contains=@stataFuncGroup
|
|
298 syn region stataFunc matchgroup=Function start=/word(/ end=/)/ contains=@stataFuncGroup
|
|
299 syn region stataFunc matchgroup=Function start=/wordcount(/ end=/)/ contains=@stataFuncGroup
|
|
300 " Programming
|
|
301 syn region stataFunc matchgroup=Function start=/autocode(/ end=/)/ contains=@stataFuncGroup
|
|
302 syn region stataFunc matchgroup=Function start=/byteorder(/ end=/)/ contains=@stataFuncGroup
|
|
303 syn region stataFunc matchgroup=Function start=/c(/ end=/)/ contains=@stataFuncGroup
|
|
304 syn region stataFunc matchgroup=Function start=/_caller(/ end=/)/ contains=@stataFuncGroup
|
|
305 syn region stataFunc matchgroup=Function start=/chop(/ end=/)/ contains=@stataFuncGroup
|
|
306 syn region stataFunc matchgroup=Function start=/clip(/ end=/)/ contains=@stataFuncGroup
|
|
307 syn region stataFunc matchgroup=Function start=/cond(/ end=/)/ contains=@stataFuncGroup
|
|
308 syn region stataFunc matchgroup=Function start=/e(/ end=/)/ contains=@stataFuncGroup
|
|
309 syn region stataFunc matchgroup=Function start=/epsdouble(/ end=/)/ contains=@stataFuncGroup
|
|
310 syn region stataFunc matchgroup=Function start=/epsfloat(/ end=/)/ contains=@stataFuncGroup
|
|
311 syn region stataFunc matchgroup=Function start=/float(/ end=/)/ contains=@stataFuncGroup
|
|
312 syn region stataFunc matchgroup=Function start=/has_eprop(/ end=/)/ contains=@stataFuncGroup
|
|
313 syn region stataFunc matchgroup=Function start=/has_eprop(/ end=/)/ contains=@stataFuncGroup
|
|
314 syn region stataFunc matchgroup=Function start=/inlist(/ end=/)/ contains=@stataFuncGroup
|
|
315 syn region stataFunc matchgroup=Function start=/inrange(/ end=/)/ contains=@stataFuncGroup
|
|
316 syn region stataFunc matchgroup=Function start=/irecode(/ end=/)/ contains=@stataFuncGroup
|
|
317 syn region stataFunc matchgroup=Function start=/matrix(/ end=/)/ contains=@stataFuncGroup
|
|
318 syn region stataFunc matchgroup=Function start=/maxbyte(/ end=/)/ contains=@stataFuncGroup
|
|
319 syn region stataFunc matchgroup=Function start=/maxdouble(/ end=/)/ contains=@stataFuncGroup
|
|
320 syn region stataFunc matchgroup=Function start=/maxfloat(/ end=/)/ contains=@stataFuncGroup
|
|
321 syn region stataFunc matchgroup=Function start=/maxint(/ end=/)/ contains=@stataFuncGroup
|
|
322 syn region stataFunc matchgroup=Function start=/maxlong(/ end=/)/ contains=@stataFuncGroup
|
|
323 syn region stataFunc matchgroup=Function start=/mi(/ end=/)/ contains=@stataFuncGroup
|
|
324 syn region stataFunc matchgroup=Function start=/minbyte(/ end=/)/ contains=@stataFuncGroup
|
|
325 syn region stataFunc matchgroup=Function start=/mindouble(/ end=/)/ contains=@stataFuncGroup
|
|
326 syn region stataFunc matchgroup=Function start=/minfloat(/ end=/)/ contains=@stataFuncGroup
|
|
327 syn region stataFunc matchgroup=Function start=/minint(/ end=/)/ contains=@stataFuncGroup
|
|
328 syn region stataFunc matchgroup=Function start=/minlong(/ end=/)/ contains=@stataFuncGroup
|
|
329 syn region stataFunc matchgroup=Function start=/missing(/ end=/)/ contains=@stataFuncGroup
|
|
330 syn region stataFunc matchgroup=Function start=/r(/ end=/)/ contains=@stataFuncGroup
|
|
331 syn region stataFunc matchgroup=Function start=/recode(/ end=/)/ contains=@stataFuncGroup
|
|
332 syn region stataFunc matchgroup=Function start=/replay(/ end=/)/ contains=@stataFuncGroup
|
|
333 syn region stataFunc matchgroup=Function start=/return(/ end=/)/ contains=@stataFuncGroup
|
|
334 syn region stataFunc matchgroup=Function start=/s(/ end=/)/ contains=@stataFuncGroup
|
|
335 syn region stataFunc matchgroup=Function start=/scalar(/ end=/)/ contains=@stataFuncGroup
|
|
336 " Date
|
|
337 syn region stataFunc matchgroup=Function start=/d(/ end=/)/ contains=@stataFuncGroup
|
|
338 syn region stataFunc matchgroup=Function start=/date(/ end=/)/ contains=@stataFuncGroup
|
|
339 syn region stataFunc matchgroup=Function start=/day(/ end=/)/ contains=@stataFuncGroup
|
|
340 syn region stataFunc matchgroup=Function start=/dow(/ end=/)/ contains=@stataFuncGroup
|
|
341 syn region stataFunc matchgroup=Function start=/doy(/ end=/)/ contains=@stataFuncGroup
|
|
342 syn region stataFunc matchgroup=Function start=/halfyear(/ end=/)/ contains=@stataFuncGroup
|
|
343 syn region stataFunc matchgroup=Function start=/mdy(/ end=/)/ contains=@stataFuncGroup
|
|
344 syn region stataFunc matchgroup=Function start=/month(/ end=/)/ contains=@stataFuncGroup
|
|
345 syn region stataFunc matchgroup=Function start=/quarter(/ end=/)/ contains=@stataFuncGroup
|
|
346 syn region stataFunc matchgroup=Function start=/week(/ end=/)/ contains=@stataFuncGroup
|
|
347 syn region stataFunc matchgroup=Function start=/year(/ end=/)/ contains=@stataFuncGroup
|
|
348 " Time-series
|
|
349 syn region stataFunc matchgroup=Function start=/daily(/ end=/)/ contains=@stataFuncGroup
|
|
350 syn region stataFunc matchgroup=Function start=/halfyearly(/ end=/)/ contains=@stataFuncGroup
|
|
351 syn region stataFunc matchgroup=Function start=/monthly(/ end=/)/ contains=@stataFuncGroup
|
|
352 syn region stataFunc matchgroup=Function start=/quarterly(/ end=/)/ contains=@stataFuncGroup
|
|
353 syn region stataFunc matchgroup=Function start=/weekly(/ end=/)/ contains=@stataFuncGroup
|
|
354 syn region stataFunc matchgroup=Function start=/yearly(/ end=/)/ contains=@stataFuncGroup
|
|
355 "
|
|
356 syn region stataFunc matchgroup=Function start=/yh(/ end=/)/ contains=@stataFuncGroup
|
|
357 syn region stataFunc matchgroup=Function start=/ym(/ end=/)/ contains=@stataFuncGroup
|
|
358 syn region stataFunc matchgroup=Function start=/yq(/ end=/)/ contains=@stataFuncGroup
|
|
359 syn region stataFunc matchgroup=Function start=/yw(/ end=/)/ contains=@stataFuncGroup
|
|
360 "
|
|
361 syn region stataFunc matchgroup=Function start=/d(/ end=/)/ contains=@stataFuncGroup
|
|
362 syn region stataFunc matchgroup=Function start=/h(/ end=/)/ contains=@stataFuncGroup
|
|
363 syn region stataFunc matchgroup=Function start=/m(/ end=/)/ contains=@stataFuncGroup
|
|
364 syn region stataFunc matchgroup=Function start=/q(/ end=/)/ contains=@stataFuncGroup
|
|
365 syn region stataFunc matchgroup=Function start=/w(/ end=/)/ contains=@stataFuncGroup
|
|
366 syn region stataFunc matchgroup=Function start=/y(/ end=/)/ contains=@stataFuncGroup
|
|
367 "
|
|
368 syn region stataFunc matchgroup=Function start=/dofd(/ end=/)/ contains=@stataFuncGroup
|
|
369 syn region stataFunc matchgroup=Function start=/dofh(/ end=/)/ contains=@stataFuncGroup
|
|
370 syn region stataFunc matchgroup=Function start=/dofm(/ end=/)/ contains=@stataFuncGroup
|
|
371 syn region stataFunc matchgroup=Function start=/dofq(/ end=/)/ contains=@stataFuncGroup
|
|
372 syn region stataFunc matchgroup=Function start=/dofw(/ end=/)/ contains=@stataFuncGroup
|
|
373 syn region stataFunc matchgroup=Function start=/dofy(/ end=/)/ contains=@stataFuncGroup
|
|
374 syn region stataFunc matchgroup=Function start=/hofd(/ end=/)/ contains=@stataFuncGroup
|
|
375 syn region stataFunc matchgroup=Function start=/mofd(/ end=/)/ contains=@stataFuncGroup
|
|
376 syn region stataFunc matchgroup=Function start=/qofd(/ end=/)/ contains=@stataFuncGroup
|
|
377 syn region stataFunc matchgroup=Function start=/wofd(/ end=/)/ contains=@stataFuncGroup
|
|
378 syn region stataFunc matchgroup=Function start=/yofd(/ end=/)/ contains=@stataFuncGroup
|
|
379 "
|
|
380 syn region stataFunc matchgroup=Function start=/tin(/ end=/)/ contains=@stataFuncGroup
|
|
381 syn region stataFunc matchgroup=Function start=/twithin(/ end=/)/ contains=@stataFuncGroup
|
|
382 " Matrix
|
|
383 syn region stataFunc matchgroup=Function start=/colnumb(/ end=/)/ contains=@stataFuncGroup
|
|
384 syn region stataFunc matchgroup=Function start=/colsof(/ end=/)/ contains=@stataFuncGroup
|
|
385 syn region stataFunc matchgroup=Function start=/det(/ end=/)/ contains=@stataFuncGroup
|
|
386 syn region stataFunc matchgroup=Function start=/diag0cnt(/ end=/)/ contains=@stataFuncGroup
|
|
387 syn region stataFunc matchgroup=Function start=/el(/ end=/)/ contains=@stataFuncGroup
|
|
388 syn region stataFunc matchgroup=Function start=/issymmetric(/ end=/)/ contains=@stataFuncGroup
|
|
389 syn region stataFunc matchgroup=Function start=/matmissing(/ end=/)/ contains=@stataFuncGroup
|
|
390 syn region stataFunc matchgroup=Function start=/mreldif(/ end=/)/ contains=@stataFuncGroup
|
|
391 syn region stataFunc matchgroup=Function start=/rownumb(/ end=/)/ contains=@stataFuncGroup
|
|
392 syn region stataFunc matchgroup=Function start=/rowsof(/ end=/)/ contains=@stataFuncGroup
|
|
393 syn region stataFunc matchgroup=Function start=/trace(/ end=/)/ contains=@stataFuncGroup
|
|
394 "
|
|
395 syn region stataFunc matchgroup=Function start=/cholsky(/ end=/)/ contains=@stataFuncGroup
|
|
396 syn region stataFunc matchgroup=Function start=/corr(/ end=/)/ contains=@stataFuncGroup
|
|
397 syn region stataFunc matchgroup=Function start=/diag(/ end=/)/ contains=@stataFuncGroup
|
|
398 syn region stataFunc matchgroup=Function start=/get(/ end=/)/ contains=@stataFuncGroup
|
|
399 syn region stataFunc matchgroup=Function start=/hadamard(/ end=/)/ contains=@stataFuncGroup
|
|
400 syn region stataFunc matchgroup=Function start=/I(/ end=/)/ contains=@stataFuncGroup
|
|
401 syn region stataFunc matchgroup=Function start=/inv(/ end=/)/ contains=@stataFuncGroup
|
|
402 syn region stataFunc matchgroup=Function start=/invsym(/ end=/)/ contains=@stataFuncGroup
|
|
403 syn region stataFunc matchgroup=Function start=/J(/ end=/)/ contains=@stataFuncGroup
|
|
404 syn region stataFunc matchgroup=Function start=/matuniform(/ end=/)/ contains=@stataFuncGroup
|
|
405 syn region stataFunc matchgroup=Function start=/nullmat(/ end=/)/ contains=@stataFuncGroup
|
|
406 syn region stataFunc matchgroup=Function start=/sweep(/ end=/)/ contains=@stataFuncGroup
|
|
407 syn region stataFunc matchgroup=Function start=/vec(/ end=/)/ contains=@stataFuncGroup
|
|
408 syn region stataFunc matchgroup=Function start=/vecdiag(/ end=/)/ contains=@stataFuncGroup
|
|
409
|
|
410 " Errors to catch
|
|
411 " taken from $VIMRUNTIME/syntax/c.vim
|
|
412 " catch errors caused by wrong parenthesis, braces and brackets
|
|
413 syn region stataParen transparent start=/(/ end=/)/ contains=ALLBUT,@stataParenGroup,stataErrInBracket,stataErrInBrace
|
|
414 syn region stataBracket transparent start=/\[/ end=/]/ contains=ALLBUT,@stataParenGroup,stataErrInParen,stataErrInBrace
|
|
415 syn region stataBrace transparent start=/{/ end=/}/ contains=ALLBUT,@stataParenGroup,stataErrInParen,stataErrInBracket
|
|
416 syn match stataParenError /[\])}]/
|
|
417 syn match stataBracketError /]/
|
|
418 syn match stataBraceError /}/
|
|
419 syn match stataErrInParen contained /[\]{}]/
|
|
420 syn match stataErrInBracket contained /[){}]/
|
|
421 syn match stataErrInBrace contained /[)\]]/
|
|
422
|
|
423 " assign highlight groups
|
|
424 hi def link stataBraceError stataError
|
|
425 hi def link stataBracketError stataError
|
|
426 hi def link stataErrInBrace stataError
|
|
427 hi def link stataErrInBracket stataError
|
|
428 hi def link stataErrInParen stataError
|
|
429 hi def link stataEString stataString
|
|
430 hi def link stataFormat stataSpecial
|
|
431 hi def link stataGlobal stataMacro
|
|
432 hi def link stataLocal stataMacro
|
|
433 hi def link stataParenError stataError
|
|
434 hi def link stataSlashComment stataComment
|
|
435 hi def link stataStarComment stataComment
|
|
436
|
|
437 hi def link stataCommand Define
|
|
438 hi def link stataComment Comment
|
|
439 hi def link stataConditional Conditional
|
|
440 hi def link stataError Error
|
|
441 hi def link stataFunc None
|
|
442 hi def link stataMacro Define
|
|
443 hi def link stataRepeat Repeat
|
|
444 hi def link stataSpecial SpecialChar
|
|
445 hi def link stataString String
|
|
446
|
|
447 let b:current_syntax = "stata"
|
|
448
|
|
449 " vim: ts=8
|