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