summaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-12 23:22:24 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-12 23:22:24 +0000
commit4770d09abd866bb53d95895dc6a5c5fe7cccb619 (patch)
treeb9ca6f4a66c7591a84cfe88fb21edb31db906a4e /runtime/syntax
parent1cbe5f739d4e75b5e16b85ae79ff0434a641b03d (diff)
downloadvim-git-4770d09abd866bb53d95895dc6a5c5fe7cccb619.tar.gz
updated for version 7.0179v7.0179
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/eviews.vim104
-rw-r--r--runtime/syntax/gretl.vim102
-rw-r--r--runtime/syntax/r.vim21
-rw-r--r--runtime/syntax/vim.vim10
4 files changed, 225 insertions, 12 deletions
diff --git a/runtime/syntax/eviews.vim b/runtime/syntax/eviews.vim
new file mode 100644
index 000000000..911e1bedf
--- /dev/null
+++ b/runtime/syntax/eviews.vim
@@ -0,0 +1,104 @@
+" Vim syntax file
+" Language: Eviews (http://www.eviews.com)
+" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
+" Last Change: 2006 Jan 11
+" Filenames: *.prg
+" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/eviews.vim
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+if version >= 600
+ setlocal iskeyword=@,48-57,_,.
+else
+ set iskeyword=@,48-57,_,.
+endif
+
+syn case match
+
+" Comment
+syn match eComment /\'.*/
+
+" Constant
+" string enclosed in double quotes
+syn region eString start=/"/ skip=/\\\\\|\\"/ end=/"/
+" number with no fractional part or exponent
+syn match eNumber /\d\+/
+" floating point number with integer and fractional parts and optional exponent
+syn match eFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
+" floating point number with no integer part and optional exponent
+syn match eFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
+" floating point number with no fractional part and optional exponent
+syn match eFloat /\d\+[Ee][-+]\=\d\+/
+
+" Identifier
+" identifier with leading letter and optional following keyword characters
+syn match eIdentifier /\a\k*/
+
+" Eviews Programing Language
+syn keyword eProgLang @date else endif @errorcount @evpath exitloop for if @isobject next poff pon return statusline step stop @temppath then @time to @toc wend while include call subroutine endsub and or
+
+" Eviews Objects, Views and Procedures
+syn keyword eOVP alpha coef equation graph group link logl matrix model pool rowvector sample scalar series sspace sym system table text valmap var vector
+
+
+" Standard Eviews Commands
+syn keyword eStdCmd 3sls add addassign addinit addtext align alpha append arch archtest area arlm arma arroots auto axis bar bdstest binary block boxplot boxplotby bplabel cause ccopy cd cdfplot cellipse censored cfetch checkderivs chow clabel cleartext close coef coefcov coint comment control copy cor correl correlsq count cov create cross data datelabel dates db dbcopy dbcreate dbdelete dbopen dbpack dbrebuild dbrename dbrepair decomp define delete derivs describe displayname do draw driconvert drop dtable ec edftest endog eqs equation errbar exclude exit expand fetch fill fiml fit forecast freeze freq frml garch genr gmm grads graph group hconvert hfetch hilo hist hlabel hpf impulse jbera kdensity kerfit label laglen legend line linefit link linkto load logit logl ls makecoint makederivs makeendog makefilter makegarch makegrads makegraph makegroup makelimits makemodel makeregs makeresids makesignals makestates makestats makesystem map matrix means merge metafile ml model msg name nnfit open options ordered output override pageappend pagecontract pagecopy pagecreate pagedelete pageload pagerename pagesave pageselect pagestack pagestruct pageunstack param pcomp pie pool predict print probit program qqplot qstats range read rename representations resample reset residcor residcov resids results rls rndint rndseed rowvector run sample save scalar scale scat scatmat scenario seas seasplot series set setbpelem setcell setcolwidth setconvert setelem setfillcolor setfont setformat setheight setindent setjust setline setlines setmerge settextcolor setwidth sheet show signalgraphs smooth smpl solve solveopt sort spec spike sspace statby statefinal stategraphs stateinit stats statusline stomna store structure sur svar sym system table template testadd testbtw testby testdrop testexog testfit testlags teststat text tic toc trace tramoseats tsls unlink update updatecoefs uroot usage valmap var vars vector wald wfcreate wfopen wfsave wfselect white wls workfile write wtsls x11 x12 xy xyline xypair
+
+" Constant Identifier
+syn match eConstant /\!\k*/
+" String Identifier
+syn match eStringId /%\k*/
+" Command Identifier
+syn match eCommand /@\k*/
+
+" Special
+syn match eDelimiter /[,;:]/
+
+" Error
+syn region eRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
+syn region eRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
+syn region eRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
+syn match eError /[)\]}]/
+syn match eBraceError /[)}]/ contained
+syn match eCurlyError /[)\]]/ contained
+syn match eParenError /[\]}]/ contained
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_r_syn_inits")
+ if version < 508
+ let did_r_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+ HiLink eComment Comment
+ HiLink eConstant Identifier
+ HiLink eStringId Identifier
+ HiLink eCommand Type
+ HiLink eString String
+ HiLink eNumber Number
+ HiLink eBoolean Boolean
+ HiLink eFloat Float
+ HiLink eConditional Conditional
+ HiLink eProgLang Statement
+ HiLink eOVP Statement
+ HiLink eStdCmd Statement
+ HiLink eIdentifier Normal
+ HiLink eDelimiter Delimiter
+ HiLink eError Error
+ HiLink eBraceError Error
+ HiLink eCurlyError Error
+ HiLink eParenError Error
+ delcommand HiLink
+endif
+
+let b:current_syntax="eviews"
+
+" vim: ts=8 sw=2
diff --git a/runtime/syntax/gretl.vim b/runtime/syntax/gretl.vim
new file mode 100644
index 000000000..9999ff0f4
--- /dev/null
+++ b/runtime/syntax/gretl.vim
@@ -0,0 +1,102 @@
+" Vim syntax file
+" Language: gretl (http://gretl.sf.net)
+" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
+" Last Change: 2006 Jan 6
+" Filenames: *.inp *.gretl
+" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/gretl.vim
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+if version >= 600
+ setlocal iskeyword=@,48-57,_,.
+else
+ set iskeyword=@,48-57,_,.
+endif
+
+syn case match
+
+" Constant
+" string enclosed in double quotes
+syn region gString start=/"/ skip=/\\\\\|\\"/ end=/"/
+" number with no fractional part or exponent
+syn match gNumber /\d\+/
+" floating point number with integer and fractional parts and optional exponent
+syn match gFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/
+" floating point number with no integer part and optional exponent
+syn match gFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/
+" floating point number with no fractional part and optional exponent
+syn match gFloat /\d\+[Ee][-+]\=\d\+/
+
+" Gretl commands
+syn keyword gCommands add addobs addto adf append ar arch arma break boxplot chow coeffsum coint coint2 corc corr corrgm criteria critical cusum data delete diff else end endif endloop eqnprint equation estimate fcast fcasterr fit freq function funcerr garch genr gnuplot graph hausman hccm help hilu hsk hurst if import include info kpss label labels lad lags ldiff leverage lmtest logistic logit logs loop mahal meantest mle modeltab mpols multiply nls nulldata ols omit omitfrom open outfile panel pca pergm plot poisson pooled print printf probit pvalue pwe quit remember rename reset restrict rhodiff rmplot run runs scatters sdiff set setobs setmiss shell sim smpl spearman square store summary system tabprint testuhat tobit transpos tsls var varlist vartest vecm vif wls
+
+"Gretl genr functions
+syn keyword gGenrFunc log exp sin cos tan atan diff ldiff sdiff mean sd min max sort int ln coeff abs rho sqrt sum nobs firstobs lastobs normal uniform stderr cum missing ok misszero corr vcv var sst cov median zeromiss pvalue critical obsnum mpow dnorm cnorm gamma lngamma resample hpfilt bkfilt fracdiff varnum isvector islist nelem
+
+" Identifier
+" identifier with leading letter and optional following keyword characters
+syn match gIdentifier /\a\k*/
+
+" Variable with leading $
+syn match gVariable /\$\k*/
+" Arrow
+syn match gArrow /<-/
+
+" Special
+syn match gDelimiter /[,;:]/
+
+" Error
+syn region gRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError,gBCstart,gBCend
+syn region gRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
+syn region gRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
+syn match gError /[)\]}]/
+syn match gBraceError /[)}]/ contained
+syn match gCurlyError /[)\]]/ contained
+syn match gParenError /[\]}]/ contained
+
+" Comment
+syn match gComment /#.*/
+syn match gBCstart /(\*/
+syn match gBCend /\*)/
+
+syn region gBlockComment matchgroup=gCommentStart start="(\*" end="\*)"
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_r_syn_inits")
+ if version < 508
+ let did_r_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+ HiLink gComment Comment
+ HiLink gCommentStart Comment
+ HiLink gBlockComment Comment
+ HiLink gString String
+ HiLink gNumber Number
+ HiLink gBoolean Boolean
+ HiLink gFloat Float
+ HiLink gCommands Repeat
+ HiLink gGenrFunc Type
+ HiLink gDelimiter Delimiter
+ HiLink gError Error
+ HiLink gBraceError Error
+ HiLink gCurlyError Error
+ HiLink gParenError Error
+ HiLink gIdentifier Normal
+ HiLink gVariable Identifier
+ HiLink gArrow Repeat
+ delcommand HiLink
+endif
+
+let b:current_syntax="gretl"
+
+" vim: ts=8 sw=2
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim
index c2ecca4ef..8432c208e 100644
--- a/runtime/syntax/r.vim
+++ b/runtime/syntax/r.vim
@@ -1,9 +1,13 @@
" Vim syntax file
" Language: R (GNU S)
-" Maintainer: Tom Payne <tom@tompayne.org>
-" Last Change: 2003 May 11
-" Filenames: *.r
-" URL: http://www.tompayne.org/vim/syntax/r.vim
+" Maintainer: Vaidotas Zemlys <zemlys@gmail.com>
+" Last Change: 2006 January 12
+" Filenames: *.R *.Rout *.r *.Rhistory *.Rt *.Rout.save *.Rout.fail
+" URL: http://uosis.mif.vu.lt/~zemlys/vim-syntax/r.vim
+
+" First maintainer Tom Payne <tom@tompayne.org>
+" Modified to make syntax less colourful and added the highlighting of
+" R assignment arrow
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
@@ -54,9 +58,10 @@ syn keyword rConstant LETTERS letters month.ab month.name pi
syn keyword rConstant NULL
syn keyword rBoolean FALSE TRUE
syn keyword rNumber NA
+syn match rArrow /<\{1,2}-/
" Type
-syn keyword rType array category character complex double function integer list logical matrix numeric vector
+syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
" Special
syn match rDelimiter /[,;:]/
@@ -89,8 +94,9 @@ if version >= 508 || !exists("did_r_syn_inits")
HiLink rStatement Statement
HiLink rConditional Conditional
HiLink rRepeat Repeat
- HiLink rIdentifier Identifier
- HiLink rType Type
+ HiLink rIdentifier Normal
+ HiLink rArrow Statement
+ HiLink rType Type
HiLink rDelimiter Delimiter
HiLink rError Error
HiLink rBraceError Error
@@ -102,3 +108,4 @@ endif
let b:current_syntax="r"
" vim: ts=8 sw=2
+
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 52ca8ae1b..21715b7ba 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -1,8 +1,8 @@
" Vim syntax file
" Language: Vim 7.0 script
" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
-" Last Change: December 09, 2005
-" Version: 7.0-21
+" Last Change: Jan 09, 2006
+" Version: 7.0-22
" Automatically generated keyword lists: {{{1
" Quit when a syntax file was already loaded {{{2
@@ -175,7 +175,7 @@ endif
syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
-syn region vimCommentString contained oneline start='\S\s\+"'ms=s+1 end='"'
+syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
" Environment Variables: {{{2
" =====================
@@ -422,7 +422,7 @@ syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster
syn match vimHiGroup contained "\i\+"
syn case ignore
-syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline
+syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl
syn keyword vimFgBgAttrib contained none bg background fg foreground
syn case match
syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib
@@ -450,7 +450,7 @@ syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList
syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError
syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList
syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname
-syn match vimHiGuiFgBg contained "\cgui[fb]g="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
+syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib
syn match vimHiTermcap contained "\S\+" contains=vimNotation
" Highlight: clear {{{2