Mercurial > vim
comparison runtime/syntax/xmath.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 3d386838cf56 |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " Vim syntax file | |
2 " Language: xmath (a simulation tool) | |
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> | |
4 " Last Change: Sep 02, 2003 | |
5 " Version: 3 | |
6 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax | |
7 | |
8 " For version 5.x: Clear all syntax items | |
9 " For version 6.x: Quit when a syntax file was already loaded | |
10 if version < 600 | |
11 syntax clear | |
12 elseif exists("b:current_syntax") | |
13 finish | |
14 endif | |
15 | |
16 " parenthesis sanity checker | |
17 syn region xmathZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathCurlyError | |
18 syn region xmathZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathParenError | |
19 syn region xmathZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,xmathError,xmathCurlyError,xmathParenError | |
20 syn match xmathError "[)\]}]" | |
21 syn match xmathBraceError "[)}]" contained | |
22 syn match xmathCurlyError "[)\]]" contained | |
23 syn match xmathParenError "[\]}]" contained | |
24 syn match xmathComma "[,;:]" | |
25 syn match xmathComma "\.\.\.$" | |
26 | |
27 " A bunch of useful xmath keywords | |
28 syn case ignore | |
29 syn keyword xmathFuncCmd function endfunction command endcommand | |
30 syn keyword xmathStatement abort beep debug default define | |
31 syn keyword xmathStatement execute exit pause return undefine | |
32 syn keyword xmathConditional if else elseif endif | |
33 syn keyword xmathRepeat while for endwhile endfor | |
34 syn keyword xmathCmd anigraph deletedatastore keep renamedatastore | |
35 syn keyword xmathCmd autocode deletestd linkhyper renamestd | |
36 syn keyword xmathCmd build deletesuperblock linksim renamesuperblock | |
37 syn keyword xmathCmd comment deletetransition listusertype save | |
38 syn keyword xmathCmd copydatastore deleteusertype load sbadisplay | |
39 syn keyword xmathCmd copystd detailmodel lock set | |
40 syn keyword xmathCmd copysuperblock display minmax_display setsbdefault | |
41 syn keyword xmathCmd createblock documentit modifyblock show | |
42 syn keyword xmathCmd createbubble editcatalog modifybubble showlicense | |
43 syn keyword xmathCmd createconnection erase modifystd showsbdefault | |
44 syn keyword xmathCmd creatertf expandsuperbubble modifysuperblock stop | |
45 syn keyword xmathCmd createstd for modifytransition stopcosim | |
46 syn keyword xmathCmd createsuperblock go modifyusertype syntax | |
47 syn keyword xmathCmd createsuperbubble goto new unalias | |
48 syn keyword xmathCmd createtransition hardcopy next unlock | |
49 syn keyword xmathCmd createusertype help polargraph usertype | |
50 syn keyword xmathCmd delete hyperbuild print whatis | |
51 syn keyword xmathCmd deleteblock if printmodel while | |
52 syn keyword xmathCmd deletebubble ifilter quit who | |
53 syn keyword xmathCmd deleteconnection ipcwc remove xgraph | |
54 | |
55 syn keyword xmathFunc abcd eye irea querystdoptions | |
56 syn keyword xmathFunc abs eyepattern is querysuperblock | |
57 syn keyword xmathFunc acos feedback ISID querysuperblockopt | |
58 syn keyword xmathFunc acosh fft ISID Models querytransition | |
59 syn keyword xmathFunc adconversion fftpdm kronecker querytransitionopt | |
60 syn keyword xmathFunc afeedback filter length qz | |
61 syn keyword xmathFunc all find limit rampinvar | |
62 syn keyword xmathFunc ambiguity firparks lin random | |
63 syn keyword xmathFunc amdemod firremez lin30 randpdm | |
64 syn keyword xmathFunc analytic firwind linearfm randpert | |
65 syn keyword xmathFunc analyze fmdemod linfnorm randsys | |
66 syn keyword xmathFunc any forwdiff lintodb rank | |
67 syn keyword xmathFunc append fprintf list rayleigh | |
68 syn keyword xmathFunc argn frac log rcepstrum | |
69 syn keyword xmathFunc argv fracred log10 rcond | |
70 syn keyword xmathFunc arma freq logm rdintegrate | |
71 syn keyword xmathFunc arma2ss freqcircle lognormal read | |
72 syn keyword xmathFunc armax freqcont logspace real | |
73 syn keyword xmathFunc ascii frequencyhop lowpass rectify | |
74 syn keyword xmathFunc asin fsesti lpopt redschur | |
75 syn keyword xmathFunc asinh fslqgcomp lqgcomp reflect | |
76 syn keyword xmathFunc atan fsregu lqgltr regulator | |
77 syn keyword xmathFunc atan2 fwls ls residue | |
78 syn keyword xmathFunc atanh gabor ls2unc riccati | |
79 syn keyword xmathFunc attach_ac100 garb ls2var riccati_eig | |
80 syn keyword xmathFunc backdiff gaussian lsjoin riccati_schur | |
81 syn keyword xmathFunc balance gcexp lu ricean | |
82 syn keyword xmathFunc balmoore gcos lyapunov rifd | |
83 syn keyword xmathFunc bandpass gdfileselection makecontinuous rlinfo | |
84 syn keyword xmathFunc bandstop gdmessage makematrix rlocus | |
85 syn keyword xmathFunc bj gdselection makepoly rms | |
86 syn keyword xmathFunc blknorm genconv margin rootlocus | |
87 syn keyword xmathFunc bode get markoff roots | |
88 syn keyword xmathFunc bpm get_info30 matchedpz round | |
89 syn keyword xmathFunc bpm2inn get_inn max rref | |
90 syn keyword xmathFunc bpmjoin gfdm maxlike rve_get | |
91 syn keyword xmathFunc bpmsplit gfsk mean rve_info | |
92 syn keyword xmathFunc bst gfskernel mergeseg rve_reset | |
93 syn keyword xmathFunc buttconstr gfunction min rve_update | |
94 syn keyword xmathFunc butterworth ggauss minimal samplehold | |
95 syn keyword xmathFunc cancel giv mkpert schur | |
96 syn keyword xmathFunc canform giv2var mkphase sdf | |
97 syn keyword xmathFunc ccepstrum givjoin mma sds | |
98 syn keyword xmathFunc char gpsk mmaget sdtrsp | |
99 syn keyword xmathFunc chebconstr gpulse mmaput sec | |
100 syn keyword xmathFunc chebyshev gqam mod sech | |
101 syn keyword xmathFunc check gqpsk modal siginterp | |
102 syn keyword xmathFunc cholesky gramp modalstate sign | |
103 syn keyword xmathFunc chop gsawtooth modcarrier sim | |
104 syn keyword xmathFunc circonv gsigmoid mreduce sim30 | |
105 syn keyword xmathFunc circorr gsin mtxplt simin | |
106 syn keyword xmathFunc clock gsinc mu simin30 | |
107 syn keyword xmathFunc clocus gsqpsk mulhank simout | |
108 syn keyword xmathFunc clsys gsquarewave multipath simout30 | |
109 syn keyword xmathFunc coherence gstep musynfit simtransform | |
110 syn keyword xmathFunc colorind GuiDialogCreate mxstr2xmstr sin | |
111 syn keyword xmathFunc combinepf GuiDialogDestroy mxstring2xmstring singriccati | |
112 syn keyword xmathFunc commentof GuiFlush names sinh | |
113 syn keyword xmathFunc compare GuiGetValue nichols sinm | |
114 syn keyword xmathFunc complementaryerf GuiManage noisefilt size | |
115 syn keyword xmathFunc complexenvelope GuiPlot none smargin | |
116 syn keyword xmathFunc complexfreqshift GuiPlotGet norm sns2sys | |
117 syn keyword xmathFunc concatseg GuiSetValue numden sort | |
118 syn keyword xmathFunc condition GuiShellCreate nyquist spectrad | |
119 syn keyword xmathFunc conj GuiShellDeiconify obscf spectrum | |
120 syn keyword xmathFunc conmap GuiShellDestroy observable spline | |
121 syn keyword xmathFunc connect GuiShellIconify oe sprintf | |
122 syn keyword xmathFunc conpdm GuiShellLower ones sqrt | |
123 syn keyword xmathFunc constellation GuiShellRaise ophank sqrtm | |
124 syn keyword xmathFunc consys GuiShellRealize optimize sresidualize | |
125 syn keyword xmathFunc controllable GuiShellUnrealize optscale ss2arma | |
126 syn keyword xmathFunc convolve GuiTimer orderfilt sst | |
127 syn keyword xmathFunc correlate GuiToolCreate orderstate ssv | |
128 syn keyword xmathFunc cos GuiToolDestroy orth stable | |
129 syn keyword xmathFunc cosh GuiToolExist oscmd stair | |
130 syn keyword xmathFunc cosm GuiUnmanage oscope starp | |
131 syn keyword xmathFunc cot GuiWidgetExist osscale step | |
132 syn keyword xmathFunc coth h2norm padcrop stepinvar | |
133 syn keyword xmathFunc covariance h2syn partialsum string | |
134 syn keyword xmathFunc csc hadamard pdm stringex | |
135 syn keyword xmathFunc csch hankelsv pdmslice substr | |
136 syn keyword xmathFunc csum hessenberg pem subsys | |
137 syn keyword xmathFunc ctrcf highpass perfplots sum | |
138 syn keyword xmathFunc ctrlplot hilbert period svd | |
139 syn keyword xmathFunc daug hilberttransform pfscale svplot | |
140 syn keyword xmathFunc dbtolin hinfcontr phaseshift sweep | |
141 syn keyword xmathFunc dct hinfnorm pinv symbolmap | |
142 syn keyword xmathFunc decimate hinfsyn plot sys2sns | |
143 syn keyword xmathFunc defFreqRange histogram plot30 sysic | |
144 syn keyword xmathFunc defTimeRange idfreq pmdemod Sysid | |
145 syn keyword xmathFunc delay idimpulse poisson system | |
146 syn keyword xmathFunc delsubstr idsim poissonimpulse tan | |
147 syn keyword xmathFunc det ifft poleplace tanh | |
148 syn keyword xmathFunc detrend imag poles taper | |
149 syn keyword xmathFunc dht impinvar polezero tfid | |
150 syn keyword xmathFunc diagonal impplot poltrend toeplitz | |
151 syn keyword xmathFunc differentiate impulse polyfit trace | |
152 syn keyword xmathFunc directsequence index polynomial tril | |
153 syn keyword xmathFunc discretize indexlist polyval trim | |
154 syn keyword xmathFunc divide initial polyvalm trim30 | |
155 syn keyword xmathFunc domain initmodel prbs triu | |
156 syn keyword xmathFunc dst initx0 product trsp | |
157 syn keyword xmathFunc eig inn2bpm psd truncate | |
158 syn keyword xmathFunc ellipconstr inn2pe put_inn tustin | |
159 syn keyword xmathFunc elliptic inn2unc qpopt uniform | |
160 syn keyword xmathFunc erf insertseg qr val | |
161 syn keyword xmathFunc error int quantize variance | |
162 syn keyword xmathFunc estimator integrate queryblock videolines | |
163 syn keyword xmathFunc etfe integratedump queryblockoptions wcbode | |
164 syn keyword xmathFunc exist interp querybubble wcgain | |
165 syn keyword xmathFunc exp interpolate querybubbleoptionswindow | |
166 syn keyword xmathFunc expm inv querycatalog wtbalance | |
167 syn keyword xmathFunc extractchan invhilbert queryconnection zeros | |
168 syn keyword xmathFunc extractseg iqmix querystd | |
169 | |
170 syn case match | |
171 | |
172 " Labels (supports xmath's goto) | |
173 syn match xmathLabel "^\s*<[a-zA-Z_][a-zA-Z0-9]*>" | |
174 | |
175 " String and Character constants | |
176 " Highlight special characters (those which have a backslash) differently | |
177 syn match xmathSpecial contained "\\\d\d\d\|\\." | |
178 syn region xmathString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xmathSpecial | |
179 syn match xmathCharacter "'[^\\]'" | |
180 syn match xmathSpecialChar "'\\.'" | |
181 | |
182 syn match xmathNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" | |
183 | |
184 " Comments: | |
185 " xmath supports #... (like Unix shells) | |
186 " and #{ ... }# comment blocks | |
187 syn keyword xmathTodo contained TODO Todo DEBUG | |
188 syn match xmathComment "#.*$" contains=xmathString,xmathTodo,@Spell | |
189 syn region xmathCommentBlock start="#{" end="}#" contains=xmathString,xmathTodo | |
190 | |
191 " synchronizing | |
192 syn sync match xmathSyncComment grouphere xmathCommentBlock "#{" | |
193 syn sync match xmathSyncComment groupthere NONE "}#" | |
194 | |
195 " Define the default highlighting. | |
196 " For version 5.7 and earlier: only when not done already | |
197 " For version 5.8 and later: only when an item doesn't have highlighting yet | |
198 if version >= 508 || !exists("did_xmath_syntax_inits") | |
199 if version < 508 | |
200 let did_xmath_syntax_inits = 1 | |
201 command -nargs=+ HiLink hi link <args> | |
202 else | |
203 command -nargs=+ HiLink hi def link <args> | |
204 endif | |
205 | |
206 HiLink xmathBraceError xmathError | |
207 HiLink xmathCmd xmathStatement | |
208 HiLink xmathCommentBlock xmathComment | |
209 HiLink xmathCurlyError xmathError | |
210 HiLink xmathFuncCmd xmathStatement | |
211 HiLink xmathParenError xmathError | |
212 | |
213 " The default methods for highlighting. Can be overridden later | |
214 HiLink xmathCharacter Character | |
215 HiLink xmathComma Delimiter | |
216 HiLink xmathComment Comment | |
217 HiLink xmathCommentBlock Comment | |
218 HiLink xmathConditional Conditional | |
219 HiLink xmathError Error | |
220 HiLink xmathFunc Function | |
221 HiLink xmathLabel PreProc | |
222 HiLink xmathNumber Number | |
223 HiLink xmathRepeat Repeat | |
224 HiLink xmathSpecial Type | |
225 HiLink xmathSpecialChar SpecialChar | |
226 HiLink xmathStatement Statement | |
227 HiLink xmathString String | |
228 HiLink xmathTodo Todo | |
229 | |
230 delcommand HiLink | |
231 endif | |
232 | |
233 let b:current_syntax = "xmath" | |
234 | |
235 " vim: ts=17 |