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