codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: xmath (a simulation tool)3" Maintainer: This runtime file is looking for a new maintainer.4" Former Maintainer: Charles E. Campbell5" Last Change: Aug 31, 20166" 2024 Feb 19 by Vim Project (announce adoption)7" Version: 108" Former URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_XMATH9 10" For version 5.x: Clear all syntax items11" For version 6.x: Quit when a syntax file was already loaded12if exists("b:current_syntax")13 finish14endif15 16" parenthesis sanity checker17syn region xmathZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathCurlyError18syn region xmathZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathParenError19syn region xmathZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,xmathError,xmathCurlyError,xmathParenError20syn match xmathError "[)\]}]"21syn match xmathBraceError "[)}]" contained22syn match xmathCurlyError "[)\]]" contained23syn match xmathParenError "[\]}]" contained24syn match xmathComma "[,;:]"25syn match xmathComma "\.\.\.$"26 27" A bunch of useful xmath keywords28syn case ignore29syn keyword xmathFuncCmd function endfunction command endcommand30syn keyword xmathStatement abort beep debug default define31syn keyword xmathStatement execute exit pause return undefine32syn keyword xmathConditional if else elseif endif33syn keyword xmathRepeat while for endwhile endfor34syn keyword xmathCmd anigraph deletedatastore keep renamedatastore35syn keyword xmathCmd autocode deletestd linkhyper renamestd36syn keyword xmathCmd build deletesuperblock linksim renamesuperblock37syn keyword xmathCmd comment deletetransition listusertype save38syn keyword xmathCmd copydatastore deleteusertype load sbadisplay39syn keyword xmathCmd copystd detailmodel lock set40syn keyword xmathCmd copysuperblock display minmax_display setsbdefault41syn keyword xmathCmd createblock documentit modifyblock show42syn keyword xmathCmd createbubble editcatalog modifybubble showlicense43syn keyword xmathCmd createconnection erase modifystd showsbdefault44syn keyword xmathCmd creatertf expandsuperbubble modifysuperblock stop45syn keyword xmathCmd createstd for modifytransition stopcosim46syn keyword xmathCmd createsuperblock go modifyusertype syntax47syn keyword xmathCmd createsuperbubble goto new unalias48syn keyword xmathCmd createtransition hardcopy next unlock49syn keyword xmathCmd createusertype help polargraph usertype50syn keyword xmathCmd delete hyperbuild print whatis51syn keyword xmathCmd deleteblock if printmodel while52syn keyword xmathCmd deletebubble ifilter quit who53syn keyword xmathCmd deleteconnection ipcwc remove xgraph54 55syn keyword xmathFunc abcd eye irea querystdoptions56syn keyword xmathFunc abs eyepattern is querysuperblock57syn keyword xmathFunc acos feedback ISID querysuperblockopt58syn keyword xmathFunc acosh fft ISID Models querytransition59syn keyword xmathFunc adconversion fftpdm kronecker querytransitionopt60syn keyword xmathFunc afeedback filter length qz61syn keyword xmathFunc all find limit rampinvar62syn keyword xmathFunc ambiguity firparks lin random63syn keyword xmathFunc amdemod firremez lin30 randpdm64syn keyword xmathFunc analytic firwind linearfm randpert65syn keyword xmathFunc analyze fmdemod linfnorm randsys66syn keyword xmathFunc any forwdiff lintodb rank67syn keyword xmathFunc append fprintf list rayleigh68syn keyword xmathFunc argn frac log rcepstrum69syn keyword xmathFunc argv fracred log10 rcond70syn keyword xmathFunc arma freq logm rdintegrate71syn keyword xmathFunc arma2ss freqcircle lognormal read72syn keyword xmathFunc armax freqcont logspace real73syn keyword xmathFunc ascii frequencyhop lowpass rectify74syn keyword xmathFunc asin fsesti lpopt redschur75syn keyword xmathFunc asinh fslqgcomp lqgcomp reflect76syn keyword xmathFunc atan fsregu lqgltr regulator77syn keyword xmathFunc atan2 fwls ls residue78syn keyword xmathFunc atanh gabor ls2unc riccati79syn keyword xmathFunc attach_ac100 garb ls2var riccati_eig80syn keyword xmathFunc backdiff gaussian lsjoin riccati_schur81syn keyword xmathFunc balance gcexp lu ricean82syn keyword xmathFunc balmoore gcos lyapunov rifd83syn keyword xmathFunc bandpass gdfileselection makecontinuous rlinfo84syn keyword xmathFunc bandstop gdmessage makematrix rlocus85syn keyword xmathFunc bj gdselection makepoly rms86syn keyword xmathFunc blknorm genconv margin rootlocus87syn keyword xmathFunc bode get markoff roots88syn keyword xmathFunc bpm get_info30 matchedpz round89syn keyword xmathFunc bpm2inn get_inn max rref90syn keyword xmathFunc bpmjoin gfdm maxlike rve_get91syn keyword xmathFunc bpmsplit gfsk mean rve_info92syn keyword xmathFunc bst gfskernel mergeseg rve_reset93syn keyword xmathFunc buttconstr gfunction min rve_update94syn keyword xmathFunc butterworth ggauss minimal samplehold95syn keyword xmathFunc cancel giv mkpert schur96syn keyword xmathFunc canform giv2var mkphase sdf97syn keyword xmathFunc ccepstrum givjoin mma sds98syn keyword xmathFunc char gpsk mmaget sdtrsp99syn keyword xmathFunc chebconstr gpulse mmaput sec100syn keyword xmathFunc chebyshev gqam mod sech101syn keyword xmathFunc check gqpsk modal siginterp102syn keyword xmathFunc cholesky gramp modalstate sign103syn keyword xmathFunc chop gsawtooth modcarrier sim104syn keyword xmathFunc circonv gsigmoid mreduce sim30105syn keyword xmathFunc circorr gsin mtxplt simin106syn keyword xmathFunc clock gsinc mu simin30107syn keyword xmathFunc clocus gsqpsk mulhank simout108syn keyword xmathFunc clsys gsquarewave multipath simout30109syn keyword xmathFunc coherence gstep musynfit simtransform110syn keyword xmathFunc colorind GuiDialogCreate mxstr2xmstr sin111syn keyword xmathFunc combinepf GuiDialogDestroy mxstring2xmstring singriccati112syn keyword xmathFunc commentof GuiFlush names sinh113syn keyword xmathFunc compare GuiGetValue nichols sinm114syn keyword xmathFunc complementaryerf GuiManage noisefilt size115syn keyword xmathFunc complexenvelope GuiPlot none smargin116syn keyword xmathFunc complexfreqshift GuiPlotGet norm sns2sys117syn keyword xmathFunc concatseg GuiSetValue numden sort118syn keyword xmathFunc condition GuiShellCreate nyquist spectrad119syn keyword xmathFunc conj GuiShellDeiconify obscf spectrum120syn keyword xmathFunc conmap GuiShellDestroy observable spline121syn keyword xmathFunc connect GuiShellIconify oe sprintf122syn keyword xmathFunc conpdm GuiShellLower ones sqrt123syn keyword xmathFunc constellation GuiShellRaise ophank sqrtm124syn keyword xmathFunc consys GuiShellRealize optimize sresidualize125syn keyword xmathFunc controllable GuiShellUnrealize optscale ss2arma126syn keyword xmathFunc convolve GuiTimer orderfilt sst127syn keyword xmathFunc correlate GuiToolCreate orderstate ssv128syn keyword xmathFunc cos GuiToolDestroy orth stable129syn keyword xmathFunc cosh GuiToolExist oscmd stair130syn keyword xmathFunc cosm GuiUnmanage oscope starp131syn keyword xmathFunc cot GuiWidgetExist osscale step132syn keyword xmathFunc coth h2norm padcrop stepinvar133syn keyword xmathFunc covariance h2syn partialsum string134syn keyword xmathFunc csc hadamard pdm stringex135syn keyword xmathFunc csch hankelsv pdmslice substr136syn keyword xmathFunc csum hessenberg pem subsys137syn keyword xmathFunc ctrcf highpass perfplots sum138syn keyword xmathFunc ctrlplot hilbert period svd139syn keyword xmathFunc daug hilberttransform pfscale svplot140syn keyword xmathFunc dbtolin hinfcontr phaseshift sweep141syn keyword xmathFunc dct hinfnorm pinv symbolmap142syn keyword xmathFunc decimate hinfsyn plot sys2sns143syn keyword xmathFunc defFreqRange histogram plot30 sysic144syn keyword xmathFunc defTimeRange idfreq pmdemod Sysid145syn keyword xmathFunc delay idimpulse poisson system146syn keyword xmathFunc delsubstr idsim poissonimpulse tan147syn keyword xmathFunc det ifft poleplace tanh148syn keyword xmathFunc detrend imag poles taper149syn keyword xmathFunc dht impinvar polezero tfid150syn keyword xmathFunc diagonal impplot poltrend toeplitz151syn keyword xmathFunc differentiate impulse polyfit trace152syn keyword xmathFunc directsequence index polynomial tril153syn keyword xmathFunc discretize indexlist polyval trim154syn keyword xmathFunc divide initial polyvalm trim30155syn keyword xmathFunc domain initmodel prbs triu156syn keyword xmathFunc dst initx0 product trsp157syn keyword xmathFunc eig inn2bpm psd truncate158syn keyword xmathFunc ellipconstr inn2pe put_inn tustin159syn keyword xmathFunc elliptic inn2unc qpopt uniform160syn keyword xmathFunc erf insertseg qr val161syn keyword xmathFunc error int quantize variance162syn keyword xmathFunc estimator integrate queryblock videolines163syn keyword xmathFunc etfe integratedump queryblockoptions wcbode164syn keyword xmathFunc exist interp querybubble wcgain165syn keyword xmathFunc exp interpolate querybubbleoptionswindow166syn keyword xmathFunc expm inv querycatalog wtbalance167syn keyword xmathFunc extractchan invhilbert queryconnection zeros168syn keyword xmathFunc extractseg iqmix querystd169 170syn case match171 172" Labels (supports xmath's goto)173syn match xmathLabel "^\s*<[a-zA-Z_][a-zA-Z0-9]*>"174 175" String and Character constants176" Highlight special characters (those which have a backslash) differently177syn match xmathSpecial contained "\\\d\d\d\|\\."178syn region xmathString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xmathSpecial,@Spell179syn match xmathCharacter "'[^\\]'"180syn match xmathSpecialChar "'\\.'"181 182syn match xmathNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"183 184" Comments:185" xmath supports #... (like Unix shells)186" and #{ ... }# comment blocks187syn cluster xmathCommentGroup contains=xmathString,xmathTodo,@Spell188syn keyword xmathTodo contained COMBAK DEBUG FIXME Todo TODO XXX189syn match xmathComment "#.*$" contains=@xmathCommentGroup190syn region xmathCommentBlock start="#{" end="}#" contains=@xmathCommentGroup191 192" synchronizing193syn sync match xmathSyncComment grouphere xmathCommentBlock "#{"194syn sync match xmathSyncComment groupthere NONE "}#"195 196" Define the default highlighting.197if !exists("skip_xmath_syntax_inits")198 199 hi def link xmathBraceError xmathError200 hi def link xmathCmd xmathStatement201 hi def link xmathCommentBlock xmathComment202 hi def link xmathCurlyError xmathError203 hi def link xmathFuncCmd xmathStatement204 hi def link xmathParenError xmathError205 206 " The default methods for highlighting. Can be overridden later207 hi def link xmathCharacter Character208 hi def link xmathComma Delimiter209 hi def link xmathComment Comment210 hi def link xmathCommentBlock Comment211 hi def link xmathConditional Conditional212 hi def link xmathError Error213 hi def link xmathFunc Function214 hi def link xmathLabel PreProc215 hi def link xmathNumber Number216 hi def link xmathRepeat Repeat217 hi def link xmathSpecial Type218 hi def link xmathSpecialChar SpecialChar219 hi def link xmathStatement Statement220 hi def link xmathString String221 hi def link xmathTodo Todo222 223endif224 225let b:current_syntax = "xmath"226 227" vim: ts=17228 