updated for version 7.0d05
This commit is contained in:
557
runtime/syntax/doxygen.vim
Normal file
557
runtime/syntax/doxygen.vim
Normal file
@ -0,0 +1,557 @@
|
||||
" DoxyGen syntax hilighting extension for c/c++/idl/java
|
||||
" Language: doxygen on top of c, cpp, idl, java
|
||||
" Maintainer: Michael Geddes <michaelrgeddes@optushome.com.au>
|
||||
" Author: Michael Geddes
|
||||
" Last Change: 12 December 2005
|
||||
" Version: 1.15
|
||||
"
|
||||
" Copyright 2004 Michael Geddes
|
||||
" Please feel free to use, modify & distribute all or part of this script,
|
||||
" providing this copyright message remains.
|
||||
" I would appreciate being acknowledged in any derived scripts, and would
|
||||
" appreciate and welcome any updates, modifications or suggestions.
|
||||
|
||||
" NOTE: Comments welcome!
|
||||
"
|
||||
" There are two variables that control the syntax hilighting produced by this
|
||||
" script:
|
||||
" doxygen_enhanced_colour - Use the (non-standard) original colours designed for this hilighting.
|
||||
" doxygen_my_rendering - Disable the HTML bold/italic/underline rendering.
|
||||
"
|
||||
" A brief description without '.' or '!' will cause the end comment
|
||||
" character to be marked as an error. You can define the colour of this using
|
||||
" the highlight doxygenErrorComment.
|
||||
" A \link without an \endlink will cause an error hilight on the end-comment.
|
||||
" This is defined by doxygenLinkError
|
||||
"
|
||||
" The variable g:doxygen_codeword_font can be set to the guifont for marking \c
|
||||
" words - a 'typewriter' like font normally. Spaces must be escaped. It can
|
||||
" also be set to any hilight attribute. Alternatively, a hilight for doxygenCodeWord
|
||||
" can be used to override it.
|
||||
"
|
||||
" By default, hilighting is done assumng you have the JAVADOC_AUTOBRIEF
|
||||
" setting tunred on in your Doxygen configuration. If you don't, you
|
||||
" can set the variable g:doxygen_javadoc_autobrief to 0 to have the
|
||||
" hilighting more accurately reflect the way Doxygen will interpret your
|
||||
" comments.
|
||||
"
|
||||
" Special thanks to: Wu Yongwei, Toby Allsopp
|
||||
"
|
||||
|
||||
if exists('b:suppress_doxygen')
|
||||
unlet b:suppress_doxygen
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('b:current_syntax') && b:current_syntax =~ 'doxygen' && !exists('doxygen_debug_script')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Start of Doxygen syntax hilighting:
|
||||
"
|
||||
|
||||
" C/C++ Style line comments
|
||||
syn region doxygenComment start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contains=doxygenSyncStart,doxygenStart,doxygenTODO keepend
|
||||
syn region doxygenCommentL start=+//[/!]<\@!+me=e-1 end=+$+ contains=doxygenStartL keepend skipwhite skipnl nextgroup=doxygenComment2
|
||||
syn region doxygenCommentL start=+//[/!]<+me=e-2 end=+$+ contains=doxygenStartL keepend skipwhite skipnl
|
||||
syn region doxygenCommentL start=+//@\ze[{}]+ end=+$+ contains=doxygenGroupDefine,doxygenGroupDefineSpecial
|
||||
|
||||
" Single line brief followed by multiline comment.
|
||||
syn region doxygenComment2 start=+/\*\(\*/\)\@![*!]+ end=+\*/+ contained contains=doxygenSyncStart2,doxygenStart2,doxygenTODO keepend
|
||||
" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
|
||||
syn match doxygenSyncStart2 +[^*/]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenSkipComment,doxygenStartSkip2 skipwhite skipnl
|
||||
|
||||
" Skip empty lines at the start for when comments start on the 2nd/3rd line.
|
||||
syn match doxygenStartSkip2 +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBody,doxygenStartSpecial,doxygenStartSkip skipwhite skipnl
|
||||
syn match doxygenStartSkip2 +^\s*\*$+ contained nextgroup=doxygenBody,doxygenStartSpecial,,doxygenStartSkip skipwhite skipnl
|
||||
syn match doxygenStart2 +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenStartSpecial,doxygenStartSkip2 skipwhite skipnl
|
||||
|
||||
" Match the Starting pattern (effectively creating the start of a BNF)
|
||||
if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
|
||||
syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
else
|
||||
syn match doxygenStart +/\*[*!]+ contained nextgroup=doxygenBody,doxygenPrev,doxygenFindBriefSpecial,doxygenStartSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
endif
|
||||
syn match doxygenStartL +//[/!]+ contained nextgroup=doxygenPrevL,doxygenBriefL,doxygenSpecial skipwhite
|
||||
|
||||
" This helps with sync-ing as for some reason, syncing behaves differently to a normal region, and the start pattern does not get matched.
|
||||
syn match doxygenSyncStart +\ze[^*/]+ contained nextgroup=doxygenBrief,doxygenPrev,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
|
||||
" Match the first sentence as a brief comment
|
||||
if ! exists('g:doxygen_end_punctuation')
|
||||
let g:doxygen_end_punctuation='[.]'
|
||||
endif
|
||||
exe 'syn region doxygenBrief contained start=+[\\@]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]+ start=+\(^\s*\)\@<!\*/\@!+ start=+\<\k+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'+ end=+\(\s*\(\n\s*\*\=\s*\)[@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\@=+ contains=doxygenSmallSpecial,doxygenContinueComment,doxygenBriefEndComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenOtherLink,doxygenHyperLink,doxygenHashLink skipnl nextgroup=doxygenBody'
|
||||
|
||||
syn match doxygenBriefEndComment +\*/+ contained
|
||||
|
||||
exe 'syn region doxygenBriefL start=+@\k\@!\|[\\@]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@]+ start=+\<+ skip=+'.doxygen_end_punctuation.'\S+ end=+'.doxygen_end_punctuation.'\|$+ contained contains=doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup keepend'
|
||||
|
||||
syn region doxygenBriefLine contained start=+\<\k+ end=+\(\n\s*\*\=\s*\([@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ contains=doxygenContinueComment,doxygenFindBriefSpecial,doxygenSmallSpecial,@doxygenHtmlGroup,doxygenTODO,doxygenOtherLink,doxygenHyperLink,doxygenHashLink skipwhite keepend
|
||||
|
||||
" Match a '<' for applying a comment to the previous element.
|
||||
syn match doxygenPrev +<+ contained nextgroup=doxygenBrief,doxygenSpecial,doxygenStartSkip skipwhite
|
||||
syn match doxygenPrevL +<+ contained nextgroup=doxygenBriefL,doxygenSpecial skipwhite
|
||||
|
||||
" These are anti-doxygen comments. If there are more than two asterisks or 3 '/'s
|
||||
" then turn the comments back into normal C comments.
|
||||
syn region cComment start="/\*\*\*" end="\*/" contains=@cCommentGroup,cCommentString,cCharacter,cNumbersCom,cSpaceError
|
||||
syn region cCommentL start="////" skip="\\$" end="$" contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError
|
||||
|
||||
" Special commands at the start of the area: starting with '@' or '\'
|
||||
syn region doxygenStartSpecial contained start=+[@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=doxygenSpecial nextgroup=doxygenSkipComment skipnl keepend
|
||||
syn match doxygenSkipComment contained +^\s*\*/\@!+ nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenPage skipwhite
|
||||
|
||||
"syn region doxygenBodyBit contained start=+$+
|
||||
|
||||
" The main body of a doxygen comment.
|
||||
syn region doxygenBody contained start=+.\|$+ matchgroup=doxygenEndComment end=+\*/+re=e-2,me=e-2 contains=doxygenContinueComment,doxygenTODO,doxygenSpecial,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup
|
||||
|
||||
" These allow the skipping of comment continuation '*' characters.
|
||||
syn match doxygenContinueComment contained +^\s*\*/\@!\s*+
|
||||
|
||||
" Catch a Brief comment without punctuation - flag it as an error but
|
||||
" make sure the end comment is picked up also.
|
||||
syn match doxygenErrorComment contained +\*/+
|
||||
|
||||
|
||||
" Skip empty lines at the start for when comments start on the 2nd/3rd line.
|
||||
if !exists('g:doxygen_javadoc_autobrief') || g:doxygen_javadoc_autobrief
|
||||
syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenBrief,doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage skipwhite skipnl
|
||||
else
|
||||
syn match doxygenStartSkip +^\s*\*[^/]+me=e-1 contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl
|
||||
syn match doxygenStartSkip +^\s*\*$+ contained nextgroup=doxygenStartSpecial,doxygenFindBriefSpecial,doxygenStartSkip,doxygenPage,doxygenBody skipwhite skipnl
|
||||
endif
|
||||
|
||||
" Match an [@\]brief so that it moves to body-mode.
|
||||
"
|
||||
"
|
||||
" syn match doxygenBriefLine contained
|
||||
syn match doxygenBriefSpecial contained +[@\\]+ nextgroup=doxygenBriefWord skipwhite
|
||||
syn region doxygenFindBriefSpecial start=+[@\\]brief\>+ end=+\(\n\s*\*\=\s*\([@\\]\([pcbea]\>\|em\>\|ref\>\|link\>\|f\$\|[$\\&<>#]\)\@!\)\|\s*$\)\@=+ keepend contains=doxygenBriefSpecial nextgroup=doxygenBody keepend skipwhite skipnl contained
|
||||
|
||||
|
||||
" Create the single word matching special identifiers.
|
||||
|
||||
fun! s:DxyCreateSmallSpecial( kword, name )
|
||||
|
||||
let mx='[-:0-9A-Za-z_%=&+*/!~>|]\@<!\([-0-9A-Za-z_%=+*/!~>|#]\+[-0-9A-Za-z_%=+*/!~>|]\@!\|\\[\\<>&.]@\|[.,][0-9a-zA-Z_]\@=\|::\|([^)]*)\|&[0-9a-zA-Z]\{2,7};\)\+'
|
||||
exe 'syn region doxygenSpecial'.a:name.'Word contained start=+'.a:kword.'+ end=+\(\_s\+'.mx.'\)\@<=[-a-zA-Z_0-9+*/^%|~!=&\\]\@!+ skipwhite contains=doxygenContinueComment,doxygen'.a:name.'Word'
|
||||
exe 'syn match doxygen'.a:name.'Word contained "\_s\@<='.mx.'" contains=doxygenHtmlSpecial keepend'
|
||||
endfun
|
||||
call s:DxyCreateSmallSpecial('p', 'Code')
|
||||
call s:DxyCreateSmallSpecial('c', 'Code')
|
||||
call s:DxyCreateSmallSpecial('b', 'Bold')
|
||||
call s:DxyCreateSmallSpecial('e', 'Emphasised')
|
||||
call s:DxyCreateSmallSpecial('em', 'Emphasised')
|
||||
call s:DxyCreateSmallSpecial('a', 'Argument')
|
||||
call s:DxyCreateSmallSpecial('ref', 'Ref')
|
||||
delfun s:DxyCreateSmallSpecial
|
||||
|
||||
syn match doxygenSmallSpecial contained +[@\\]\(\<[pcbea]\>\|\<em\>\|\<ref\>\|\<link\>\|f\$\|[$\\&<>#]\)\@=+ nextgroup=doxygenOtherLink,doxygenHyperLink,doxygenHashLink,doxygenFormula,doxygenSymbol,doxygenSpecial.*Word
|
||||
|
||||
" Now for special characters
|
||||
syn match doxygenSpecial contained +[@\\]\(\<[pcbea]\>\|\<em\>\|\<ref\|\<link\>\>\|\<f\$\|[$\\&<>#]\)\@!+ nextgroup=doxygenParam,doxygenRetval,doxygenBriefWord,doxygenBold,doxygenBOther,doxygenOther,doxygenOtherTODO,doxygenOtherWARN,doxygenOtherBUG,doxygenPage,doxygenGroupDefine,doxygenCodeRegion,doxygenVerbatimRegion,doxygenDotRegion
|
||||
" doxygenOtherLink,doxygenSymbol,doxygenFormula,doxygenErrorSpecial,doxygenSpecial.*Word
|
||||
"
|
||||
syn match doxygenGroupDefine contained +@\@<=[{}]+
|
||||
syn match doxygenGroupDefineSpecial contained +@\ze[{}]+
|
||||
|
||||
syn match doxygenErrorSpecial contained +\s+
|
||||
|
||||
" Match Parmaters and retvals (hilighting the first word as special).
|
||||
syn match doxygenParamDirection contained +\[\(\<in\>\|\<out\>\|,\)\+\]+ nextgroup=doxygenParamName skipwhite
|
||||
syn keyword doxygenParam contained param nextgroup=doxygenParamName,doxygenParamDirection skipwhite
|
||||
syn match doxygenParamName contained +[A-Za-z0-9_:]\++ nextgroup=doxygenSpecialMultilineDesc skipwhite
|
||||
syn keyword doxygenRetval contained retval throw exception nextgroup=doxygenParamName skipwhite
|
||||
|
||||
" Match one line identifiers.
|
||||
syn keyword doxygenOther contained addindex anchor
|
||||
\ dontinclude endhtmlonly endlatexonly showinitializer hideinitializer
|
||||
\ example htmlonly image include ingroup internal latexonly line
|
||||
\ overload relates relatesalso sa skip skipline
|
||||
\ until verbinclude version addtogroup htmlinclude copydoc dotfile
|
||||
\ xmlonly endxmlonly
|
||||
\ nextgroup=doxygenSpecialOnelineDesc
|
||||
|
||||
syn region doxygenCodeRegion contained matchgroup=doxygenOther start=+\<code\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endcode\>+ contains=doxygenCodeRegionSpecial,doxygenContinueComment,doxygenErrorComment
|
||||
syn match doxygenCodeRegionSpecial contained +[\\@]\(endcode\>\)\@=+
|
||||
|
||||
syn region doxygenVerbatimRegion contained matchgroup=doxygenOther start=+\<verbatim\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<endverbatim\>+ contains=doxygenVerbatimRegionSpecial,doxygenContinueComment,doxygenErrorComment
|
||||
syn match doxygenVerbatimRegionSpecial contained +[\\@]\(endverbatim\>\)\@=+
|
||||
|
||||
let b:doxygen_syntax_save=b:current_syntax
|
||||
unlet b:current_syntax
|
||||
syn include @Dotx syntax/dot.vim
|
||||
let b:current_syntax=b:doxygen_syntax_save
|
||||
unlet b:doxygen_syntax_save
|
||||
syn region doxygenDotRegion contained matchgroup=doxygenOther start=+\<dot\>+ matchgroup=doxygenOther end=+[\\@]\@<=\<enddot\>+ contains=doxygenDotRegionSpecial,doxygenErrorComment,doxygenContinueComment,@Dotx
|
||||
syn match doxygenDotRegionSpecial contained +[\\@]\(enddot\>\)\@=+
|
||||
|
||||
" Match single line identifiers.
|
||||
syn keyword doxygenBOther contained class enum file fn mainpage interface
|
||||
\ namespace struct typedef union var def name
|
||||
\ nextgroup=doxygenSpecialTypeOnelineDesc
|
||||
|
||||
syn keyword doxygenOther contained par nextgroup=doxygenHeaderLine
|
||||
syn region doxygenHeaderLine start=+.+ end=+^+ contained skipwhite nextgroup=doxygenSpecialMultilineDesc
|
||||
|
||||
syn keyword doxygenOther contained arg author date deprecated li return see invariant note post pre remarks since test nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOtherTODO contained todo attention nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOtherWARN contained warning nextgroup=doxygenSpecialMultilineDesc
|
||||
syn keyword doxygenOtherBUG contained bug nextgroup=doxygenSpecialMultilineDesc
|
||||
|
||||
" Handle \link, \endlink, hilighting the link-to and the link text bits separately.
|
||||
syn region doxygenOtherLink matchgroup=doxygenOther start=+link+ end=+[\@]\@<=endlink\>+ contained contains=doxygenLinkWord,doxygenContinueComment,doxygenLinkError,doxygenEndlinkSpecial
|
||||
syn match doxygenEndlinkSpecial contained +[\\@]\zeendlink\>+
|
||||
|
||||
syn match doxygenLinkWord "[_a-zA-Z:#()][_a-z0-9A-Z:#()]*\>" contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
|
||||
syn match doxygenLinkRest +[^*@\\]\|\*/\@!\|[@\\]\(endlink\>\)\@!+ contained skipnl nextgroup=doxygenLinkRest,doxygenContinueLinkComment
|
||||
syn match doxygenContinueLinkComment contained +^\s*\*\=[^/]+me=e-1 nextgroup=doxygenLinkRest
|
||||
syn match doxygenLinkError "\*/" contained
|
||||
" #Link hilighting.
|
||||
syn match doxygenHashLink /\([a-zA-Z_][0-9a-zA-Z_]*\)\?#\(\.[0-9a-zA-Z_]\@=\|[a-zA-Z0-9_]\+\|::\|()\)\+/ contained contains=doxygenHashSpecial
|
||||
syn match doxygenHashSpecial /#/ contained
|
||||
syn match doxygenHyperLink /\(\s\|^\s*\*\?\)\@<=\(http\|https\|ftp\):\/\/[-0-9a-zA-Z_?&=+#%/.!':;@]\+/ contained
|
||||
|
||||
" Handle \page. This does not use doxygenBrief.
|
||||
syn match doxygenPage "[\\@]page\>"me=s+1 contained skipwhite nextgroup=doxygenPagePage
|
||||
syn keyword doxygenPagePage page contained skipwhite nextgroup=doxygenPageIdent
|
||||
syn region doxygenPageDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenBody
|
||||
syn match doxygenPageIdent "\<[a-zA-Z0-9]\+\>" contained nextgroup=doxygenPageDesc
|
||||
|
||||
" Handle section
|
||||
syn keyword doxygenOther defgroup section subsection subsubsection weakgroup contained skipwhite nextgroup=doxygenSpecialIdent
|
||||
syn region doxygenSpecialSectionDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend skipwhite skipnl nextgroup=doxygenContinueComment
|
||||
syn match doxygenSpecialIdent "\<[a-zA-Z0-9]\+\>" contained nextgroup=doxygenSpecialSectionDesc
|
||||
|
||||
" Does the one-line description for the one-line type identifiers.
|
||||
syn region doxygenSpecialTypeOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
|
||||
syn region doxygenSpecialOnelineDesc start=+.\++ end=+$+ contained skipwhite contains=doxygenSmallSpecial,@doxygenHtmlGroup keepend
|
||||
|
||||
" Handle the multiline description for the multiline type identifiers.
|
||||
" Continue until an 'empty' line (can contain a '*' continuation) or until the
|
||||
" next whole-line @ command \ command.
|
||||
syn region doxygenSpecialMultilineDesc start=+.\++ skip=+^\s*\(\*/\@!\s*\)\=\(\<\|[@\\]\<\([pcbea]\>\|em\>\|ref\|link\>\>\|f\$\|[$\\&<>#]\)\|[^ \t\\@*]\)+ end=+^+ contained contains=doxygenSpecialContinueComment,doxygenSmallSpecial,doxygenHyperLink,doxygenHashLink,@doxygenHtmlGroup skipwhite keepend
|
||||
syn match doxygenSpecialContinueComment contained +^\s*\*/\@!\s*+ nextgroup=doxygenSpecial skipwhite
|
||||
|
||||
" Handle special cases 'bold' and 'group'
|
||||
syn keyword doxygenBold contained bold nextgroup=doxygenSpecialHeading
|
||||
syn keyword doxygenBriefWord contained brief nextgroup=doxygenBriefLine skipwhite
|
||||
syn match doxygenSpecialHeading +.\++ contained skipwhite
|
||||
syn keyword doxygenGroup contained group nextgroup=doxygenGroupName skipwhite
|
||||
syn keyword doxygenGroupName contained +\k\++ nextgroup=doxygenSpecialOnelineDesc skipwhite
|
||||
|
||||
" Handle special symbol identifiers @$, @\, @$ etc
|
||||
syn match doxygenSymbol contained +[$\\&<>#]+
|
||||
|
||||
" Simplistic handling of formula regions
|
||||
syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\$+ end=+[@\\]f\$+ contains=doxygenFormulaSpecial,doxygenFormulaOperator
|
||||
syn match doxygenFormulaSpecial contained +[@\\]\(f[^$]\|[^f]\)+me=s+1 nextgroup=doxygenFormulaKeyword,doxygenFormulaEscaped
|
||||
syn match doxygenFormulaEscaped contained "."
|
||||
syn match doxygenFormulaKeyword contained "[a-z]\+"
|
||||
syn match doxygenFormulaOperator contained +[_^]+
|
||||
|
||||
syn region doxygenFormula contained matchgroup=doxygenFormulaEnds start=+f\[+ end=+[@\\]f]+ contains=doxygenFormulaSpecial,doxygenFormulaOperator,doxygenAtom
|
||||
syn region doxygenAtom contained transparent matchgroup=doxygenFormulaOperator start=+{+ end=+}+ contains=doxygenAtom,doxygenFormulaSpecial,doxygenFormulaOperator
|
||||
|
||||
" Add TODO hilighting.
|
||||
syn keyword doxygenTODO contained TODO README XXX FIXME
|
||||
|
||||
" Supported HTML subset. Not perfect, but okay.
|
||||
syn case ignore
|
||||
syn region doxygenHtmlTag contained matchgroup=doxygenHtmlCh start=+\v\</=\ze([biuap]|em|strong|img|br|center|code|dfn|d[ldt]|hr|h[0-3]|li|[ou]l|pre|small|sub|sup|table|tt|var|caption|src|alt|longdesc|name|height|width|usemap|ismap|href|type)>+ skip=+\\<\|\<\k\+=\("[^"]*"\|'[^']*\)+ end=+>+ contains=doxygenHtmlCmd,doxygenContinueComment,doxygenHtmlVar
|
||||
syn keyword doxygenHtmlCmd contained b i em strong u img a br p center code dfn dl dd dt hr h1 h2 h3 li ol ul pre small sub sup table tt var caption nextgroup=doxygenHtmlVar skipwhite
|
||||
syn keyword doxygenHtmlVar contained src alt longdesc name height width usemap ismap href type nextgroup=doxygenHtmlEqu skipwhite
|
||||
syn match doxygenHtmlEqu contained +=+ nextgroup=doxygenHtmlExpr skipwhite
|
||||
syn match doxygenHtmlExpr contained +"\(\\.\|[^"]\)*"\|'\(\\.\|[^']\)*'+ nextgroup=doxygenHtmlVar skipwhite
|
||||
syn case match
|
||||
syn match doxygenHtmlSpecial contained "&\(copy\|quot\|[AEIOUYaeiouy]uml\|[AEIOUYaeiouy]acute\|[AEIOUaeiouy]grave\|[AEIOUaeiouy]circ\|[ANOano]tilde\|szlig\|[Aa]ring\|nbsp\|gt\|lt\|amp\);"
|
||||
|
||||
syn cluster doxygenHtmlGroup contains=doxygenHtmlCode,doxygenHtmlBold,doxygenHtmlUnderline,doxygenHtmlItalic,doxygenHtmlSpecial,doxygenHtmlTag,doxygenHtmlLink
|
||||
|
||||
syn cluster doxygenHtmlTop contains=@Spell,doxygenHtmlSpecial,doxygenHtmlTag,doxygenContinueComment
|
||||
" Html Support
|
||||
syn region doxygenHtmlLink contained start=+<[aA]\>\s*\(\n\s*\*\s*\)\=\(\(name\|href\)=\("[^"]*"\|'[^']*'\)\)\=\s*>+ end=+</[aA]>+me=e-4 contains=@doxygenHtmlTop
|
||||
hi link doxygenHtmlLink Underlined
|
||||
|
||||
syn region doxygenHtmlBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic
|
||||
syn region doxygenHtmlBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderline,doxygenHtmlBoldItalic
|
||||
syn region doxygenHtmlBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic
|
||||
syn region doxygenHtmlBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline
|
||||
syn region doxygenHtmlBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,doxygenHtmlBoldItalicUnderline
|
||||
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlBoldUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlBoldItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlBoldUnderlineItalic
|
||||
|
||||
syn region doxygenHtmlUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBold,doxygenHtmlUnderlineItalic
|
||||
syn region doxygenHtmlUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic
|
||||
syn region doxygenHtmlUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlUnderlineBoldItalic
|
||||
syn region doxygenHtmlUnderlineItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,htmUnderlineItalicBold
|
||||
syn region doxygenHtmlUnderlineItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop,htmUnderlineItalicBold
|
||||
syn region doxygenHtmlUnderlineItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderlineItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlUnderlineBoldItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
|
||||
|
||||
syn region doxygenHtmlItalic contained start="\c<i\>" end="\c</i>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBold,doxygenHtmlItalicUnderline
|
||||
syn region doxygenHtmlItalic contained start="\c<em\>" end="\c</em>"me=e-5 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalicBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline
|
||||
syn region doxygenHtmlItalicBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop,doxygenHtmlItalicBoldUnderline
|
||||
syn region doxygenHtmlItalicBoldUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalicUnderline contained start="\c<u\>" end="\c</u>"me=e-4 contains=@doxygenHtmlTop,doxygenHtmlItalicUnderlineBold
|
||||
syn region doxygenHtmlItalicUnderlineBold contained start="\c<b\>" end="\c</b>"me=e-4 contains=@doxygenHtmlTop
|
||||
syn region doxygenHtmlItalicUnderlineBold contained start="\c<strong\>" end="\c</strong>"me=e-9 contains=@doxygenHtmlTop
|
||||
|
||||
syn region doxygenHtmlCode contained start="\c<code\>" end="\c</code>"me=e-7 contains=@doxygenHtmlTop
|
||||
|
||||
" Prevent the doxygen contained matches from leaking into the c groups.
|
||||
syn cluster cParenGroup add=doxygen.*
|
||||
syn cluster cParenGroup remove=doxygenComment,doxygenCommentL
|
||||
syn cluster cPreProcGroup add=doxygen.*
|
||||
syn cluster cMultiGroup add=doxygen.*
|
||||
syn cluster rcParenGroup add=doxygen.*
|
||||
syn cluster rcParenGroup remove=doxygenComment,doxygenCommentL
|
||||
syn cluster rcGroup add=doxygen.*
|
||||
|
||||
" Trick to force special doxygen hilighting if the background changes (need to
|
||||
" syn clear first)
|
||||
if exists("did_doxygen_syntax_inits")
|
||||
if did_doxygen_syntax_inits != &background && synIDattr(highlightID('doxygen_Dummy'), 'fg', 'gui')==''
|
||||
command -nargs=+ SynColor hi <args>
|
||||
unlet did_doxygen_syntax_inits
|
||||
endif
|
||||
else
|
||||
command -nargs=+ SynColor hi def <args>
|
||||
endif
|
||||
|
||||
if !exists("did_doxygen_syntax_inits")
|
||||
command -nargs=+ SynLink hi def link <args>
|
||||
let did_doxygen_syntax_inits = &background
|
||||
hi doxygen_Dummy guifg=black
|
||||
|
||||
fun! s:Doxygen_Hilights_Base()
|
||||
SynLink doxygenHtmlSpecial Special
|
||||
SynLink doxygenHtmlVar Type
|
||||
SynLink doxygenHtmlExpr String
|
||||
|
||||
SynLink doxygenSmallSpecial SpecialChar
|
||||
|
||||
SynLink doxygenSpecialCodeWord doxygenSmallSpecial
|
||||
SynLink doxygenSpecialBoldWord doxygenSmallSpecial
|
||||
SynLink doxygenSpecialEmphasisedWord doxygenSmallSpecial
|
||||
SynLink doxygenSpecialArgumentWord doxygenSmallSpecial
|
||||
|
||||
" SynColor doxygenFormulaKeyword cterm=bold ctermfg=DarkMagenta guifg=DarkMagenta gui=bold
|
||||
SynLink doxygenFormulaKeyword Keyword
|
||||
"SynColor doxygenFormulaEscaped ctermfg=DarkMagenta guifg=DarkMagenta gui=bold
|
||||
SynLink doxygenFormulaEscaped Special
|
||||
SynLink doxygenFormulaOperator Operator
|
||||
SynLink doxygenFormula Statement
|
||||
SynLink doxygenSymbol Constant
|
||||
SynLink doxygenSpecial Special
|
||||
SynLink doxygenFormulaSpecial Special
|
||||
"SynColor doxygenFormulaSpecial ctermfg=DarkBlue guifg=DarkBlue
|
||||
endfun
|
||||
call s:Doxygen_Hilights_Base()
|
||||
|
||||
fun! s:Doxygen_Hilights()
|
||||
" Pick a sensible default for 'codeword'.
|
||||
let font=''
|
||||
if exists('g:doxygen_codeword_font')
|
||||
if g:doxygen_codeword_font !~ '\<\k\+='
|
||||
let font='font='.g:doxygen_codeword_font
|
||||
else
|
||||
let font=g:doxygen_codeword_font
|
||||
endif
|
||||
else
|
||||
" Try and pick a font (only some platforms have been tested).
|
||||
if has('gui_running')
|
||||
if has('gui_gtk2')
|
||||
if &guifont == ''
|
||||
let font="font='FreeSerif 12'"
|
||||
else
|
||||
let font="font='".substitute(&guifont, '^.\{-}\([0-9]\+\)$', 'FreeSerif \1','')."'"
|
||||
endif
|
||||
|
||||
elseif has('gui_win32') || has('gui_win16') || has('gui_win95')
|
||||
if &guifont == ''
|
||||
let font='font=Lucida_Console:h10'
|
||||
else
|
||||
let font='font='.substitute(&guifont, '^[^:]*', 'Lucida_Console','')
|
||||
endif
|
||||
elseif has('gui_athena') || has('gui_gtk') || &guifont=~'^\(-[^-]\+\)\{14}'
|
||||
if &guifont == ''
|
||||
let font='font=-b&h-lucidatypewriter-medium-r-normal-*-*-140-*-*-m-*-iso8859-1'
|
||||
else
|
||||
" let font='font='.substitute(&guifont,'^\(-[^-]\+\)\{7}-\([0-9]\+\).*', '-b\&h-lucidatypewriter-medium-r-normal-*-*-\2-*-*-m-*-iso8859-1','')
|
||||
" The above line works, but it is hard to expect the combination of
|
||||
" the two fonts will look good.
|
||||
endif
|
||||
elseif has('gui_kde')
|
||||
" let font='font=Bitstream\ Vera\ Sans\ Mono/12/-1/5/50/0/0/0/0/0'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if font=='' | let font='gui=bold' | endif
|
||||
exe 'SynColor doxygenCodeWord term=bold cterm=bold '.font
|
||||
if (exists('g:doxygen_enhanced_color') && g:doxygen_enhanced_color) || (exists('g:doxygen_enhanced_colour') && g:doxygen_enhanced_colour)
|
||||
if &background=='light'
|
||||
SynColor doxygenComment ctermfg=DarkRed guifg=DarkRed
|
||||
SynColor doxygenBrief cterm=bold ctermfg=Cyan guifg=DarkBlue gui=bold
|
||||
SynColor doxygenBody ctermfg=DarkBlue guifg=DarkBlue
|
||||
SynColor doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=DarkRed guifg=firebrick3 gui=bold
|
||||
SynColor doxygenBOther cterm=bold ctermfg=DarkMagenta guifg=#aa50aa gui=bold
|
||||
SynColor doxygenParam ctermfg=DarkGray guifg=#aa50aa
|
||||
SynColor doxygenParamName cterm=italic ctermfg=DarkBlue guifg=DeepSkyBlue4 gui=italic,bold
|
||||
SynColor doxygenSpecialOnelineDesc cterm=bold ctermfg=DarkCyan guifg=DodgerBlue3 gui=bold
|
||||
SynColor doxygenSpecialHeading cterm=bold ctermfg=DarkBlue guifg=DeepSkyBlue4 gui=bold
|
||||
SynColor doxygenPrev ctermfg=DarkGreen guifg=DarkGreen
|
||||
else
|
||||
SynColor doxygenComment ctermfg=LightRed guifg=LightRed
|
||||
SynColor doxygenBrief cterm=bold ctermfg=Cyan ctermbg=darkgrey guifg=LightBlue gui=Bold,Italic
|
||||
SynColor doxygenBody ctermfg=Cyan guifg=LightBlue
|
||||
SynColor doxygenSpecialTypeOnelineDesc cterm=bold ctermfg=Red guifg=firebrick3 gui=bold
|
||||
SynColor doxygenBOther cterm=bold ctermfg=Magenta guifg=#aa50aa gui=bold
|
||||
SynColor doxygenParam ctermfg=LightGray guifg=LightGray
|
||||
SynColor doxygenParamName cterm=italic ctermfg=LightBlue guifg=LightBlue gui=italic,bold
|
||||
SynColor doxygenSpecialOnelineDesc cterm=bold ctermfg=LightCyan guifg=LightCyan gui=bold
|
||||
SynColor doxygenSpecialHeading cterm=bold ctermfg=LightBlue guifg=LightBlue gui=bold
|
||||
SynColor doxygenPrev ctermfg=LightGreen guifg=LightGreen
|
||||
endif
|
||||
else
|
||||
SynLink doxygenComment SpecialComment
|
||||
SynLink doxygenBrief Statement
|
||||
SynLink doxygenBody Comment
|
||||
SynLink doxygenSpecialTypeOnelineDesc Statement
|
||||
SynLink doxygenBOther Constant
|
||||
SynLink doxygenParam SpecialComment
|
||||
SynLink doxygenParamName Underlined
|
||||
SynLink doxygenSpecialOnelineDesc Statement
|
||||
SynLink doxygenSpecialHeading Statement
|
||||
SynLink doxygenPrev SpecialComment
|
||||
endif
|
||||
endfun
|
||||
call s:Doxygen_Hilights()
|
||||
" This is still a proposal, but won't do any harm.
|
||||
au Syntax UserColor_reset nested call s:Doxygen_Hilights_Base()
|
||||
au Syntax UserColor_{on,reset,enable} nested call s:Doxygen_Hilights()
|
||||
|
||||
SynLink doxygenBody Comment
|
||||
SynLink doxygenTODO Todo
|
||||
SynLink doxygenOtherTODO Todo
|
||||
SynLink doxygenOtherWARN Todo
|
||||
SynLink doxygenOtherBUG Todo
|
||||
|
||||
SynLink doxygenErrorSpecial Error
|
||||
SynLink doxygenErrorEnd Error
|
||||
SynLink doxygenErrorComment Error
|
||||
SynLink doxygenLinkError Error
|
||||
SynLink doxygenBriefSpecial doxygenSpecial
|
||||
SynLink doxygenHashSpecial doxygenSpecial
|
||||
SynLink doxygenGroupDefineSpecial doxygenSpecial
|
||||
SynLink doxygenEndlinkSpecial doxygenSpecial
|
||||
SynLink doxygenCodeRegionSpecial doxygenSpecial
|
||||
SynLink doxygenVerbatimRegionSpecial doxygenSpecial
|
||||
SynLink doxygenGroupDefine doxygenParam
|
||||
|
||||
SynLink doxygenSpecialMultilineDesc doxygenSpecialOnelineDesc
|
||||
SynLink doxygenFormulaEnds doxygenSpecial
|
||||
SynLink doxygenBold doxygenParam
|
||||
SynLink doxygenBriefWord doxygenParam
|
||||
SynLink doxygenRetval doxygenParam
|
||||
SynLink doxygenOther doxygenParam
|
||||
SynLink doxygenStart doxygenComment
|
||||
SynLink doxygenStart2 doxygenStart
|
||||
SynLink doxygenComment2 doxygenComment
|
||||
SynLink doxygenCommentL doxygenComment
|
||||
SynLink doxygenContinueComment doxygenComment
|
||||
SynLink doxygenSpecialContinueComment doxygenComment
|
||||
SynLink doxygenSkipComment doxygenComment
|
||||
SynLink doxygenEndComment doxygenComment
|
||||
SynLink doxygenStartL doxygenComment
|
||||
SynLink doxygenBriefEndComment doxygenComment
|
||||
SynLink doxygenPrevL doxygenPrev
|
||||
SynLink doxygenBriefL doxygenBrief
|
||||
SynLink doxygenBriefLine doxygenBrief
|
||||
SynLink doxygenHeaderLine doxygenSpecialHeading
|
||||
SynLink doxygenStartSkip doxygenContinueComment
|
||||
SynLink doxygenLinkWord doxygenParamName
|
||||
SynLink doxygenLinkRest doxygenSpecialMultilineDesc
|
||||
SynLink doxygenHyperLink doxygenLinkWord
|
||||
SynLink doxygenHashLink doxygenLinkWord
|
||||
|
||||
SynLink doxygenPage doxygenSpecial
|
||||
SynLink doxygenPagePage doxygenBOther
|
||||
SynLink doxygenPageIdent doxygenParamName
|
||||
SynLink doxygenPageDesc doxygenSpecialTypeOnelineDesc
|
||||
|
||||
SynLink doxygenSpecialIdent doxygenPageIdent
|
||||
SynLink doxygenSpecialSectionDesc doxygenSpecialMultilineDesc
|
||||
|
||||
SynLink doxygenSpecialRefWord doxygenOther
|
||||
SynLink doxygenRefWord doxygenPageIdent
|
||||
SynLink doxygenContinueLinkComment doxygenComment
|
||||
|
||||
SynLink doxygenHtmlCh Function
|
||||
SynLink doxygenHtmlCmd Statement
|
||||
SynLink doxygenHtmlBoldItalicUnderline doxygenHtmlBoldUnderlineItalic
|
||||
SynLink doxygenHtmlUnderlineBold doxygenHtmlBoldUnderline
|
||||
SynLink doxygenHtmlUnderlineItalicBold doxygenHtmlBoldUnderlineItalic
|
||||
SynLink doxygenHtmlUnderlineBoldItalic doxygenHtmlBoldUnderlineItalic
|
||||
SynLink doxygenHtmlItalicUnderline doxygenHtmlUnderlineItalic
|
||||
SynLink doxygenHtmlItalicBold doxygenHtmlBoldItalic
|
||||
SynLink doxygenHtmlItalicBoldUnderline doxygenHtmlBoldUnderlineItalic
|
||||
SynLink doxygenHtmlItalicUnderlineBold doxygenHtmlBoldUnderlineItalic
|
||||
SynLink doxygenHtmlLink Underlined
|
||||
|
||||
SynLink doxygenParamDirection StorageClass
|
||||
|
||||
|
||||
if !exists("doxygen_my_rendering") && !exists("html_my_rendering")
|
||||
SynColor doxygenBoldWord term=bold cterm=bold gui=bold
|
||||
SynColor doxygenEmphasisedWord term=italic cterm=italic gui=italic
|
||||
SynLink doxygenArgumentWord doxygenEmphasisedWord
|
||||
SynLink doxygenHtmlCode doxygenCodeWord
|
||||
SynLink doxygenHtmlBold doxygenBoldWord
|
||||
SynColor doxygenHtmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
|
||||
SynColor doxygenHtmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
|
||||
SynColor doxygenHtmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
|
||||
SynColor doxygenHtmlUnderline term=underline cterm=underline gui=underline
|
||||
SynColor doxygenHtmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
|
||||
SynColor doxygenHtmlItalic term=italic cterm=italic gui=italic
|
||||
endif
|
||||
delcommand SynLink
|
||||
delcommand SynColor
|
||||
endif
|
||||
|
||||
if &syntax=='idl'
|
||||
syn cluster idlCommentable add=doxygenComment,doxygenCommentL
|
||||
endif
|
||||
|
||||
"syn sync clear
|
||||
"syn sync maxlines=500
|
||||
"syn sync minlines=50
|
||||
if v:version >= 600
|
||||
syn sync match doxygenComment groupthere cComment "/\@<!/\*"
|
||||
syn sync match doxygenSyncComment grouphere doxygenComment "/\@<!/\*[*!]"
|
||||
else
|
||||
syn sync match doxygencComment groupthere cComment "/\*"
|
||||
syn sync match doxygenSyncComment grouphere doxygenComment "/\*[*!]"
|
||||
endif
|
||||
"syn sync match doxygenSyncComment grouphere doxygenComment "/\*[*!]" contains=doxygenStart,doxygenTODO keepend
|
||||
syn sync match doxygenSyncEndComment groupthere NONE "\*/"
|
||||
|
||||
if !exists('b:current_syntax')
|
||||
let b:current_syntax = "doxygen"
|
||||
else
|
||||
let b:current_syntax = b:current_syntax.'+doxygen'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" vim:et sw=2 sts=2
|
||||
@ -1,10 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: eRuby
|
||||
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
|
||||
" Info: $Id$
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" ----------------------------------------------------------------------------
|
||||
" Language: eRuby
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Info: $Id$
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
" Vim syntax file
|
||||
" Language: Ruby
|
||||
" Maintainer: Doug Kearns <djkea2 at gus.gscit.monash.edu.au>
|
||||
" Info: $Id$
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Language: Ruby
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Info: $Id$
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Previous Maintainer: Mirko Nasato
|
||||
|
||||
308
runtime/syntax/smcl.vim
Normal file
308
runtime/syntax/smcl.vim
Normal file
@ -0,0 +1,308 @@
|
||||
" stata_smcl.vim -- Vim syntax file for smcl files.
|
||||
" Language: SMCL -- Stata Markup and Control Language
|
||||
" Maintainer: Jeff Pitblado <jpitblado@stata.com>
|
||||
" Last Change: 14apr2006
|
||||
" Version: 1.1.1
|
||||
" Location: http://www.stata.com/users/jpitblado/files/vimfiles/syntax/stata_smcl.vim
|
||||
|
||||
" Log:
|
||||
" 20mar2003 updated the match definition for cmdab
|
||||
" 14apr2006 'syntax clear' only under version control
|
||||
" check for 'b:current_syntax', removed 'did_smcl_syntax_inits'
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax case match
|
||||
|
||||
syn keyword smclCCLword current_date contained
|
||||
syn keyword smclCCLword current_time contained
|
||||
syn keyword smclCCLword rmsg_time contained
|
||||
syn keyword smclCCLword stata_version contained
|
||||
syn keyword smclCCLword version contained
|
||||
syn keyword smclCCLword born_date contained
|
||||
syn keyword smclCCLword flavor contained
|
||||
syn keyword smclCCLword SE contained
|
||||
syn keyword smclCCLword mode contained
|
||||
syn keyword smclCCLword console contained
|
||||
syn keyword smclCCLword os contained
|
||||
syn keyword smclCCLword osdtl contained
|
||||
syn keyword smclCCLword machine_type contained
|
||||
syn keyword smclCCLword byteorder contained
|
||||
syn keyword smclCCLword sysdir_stata contained
|
||||
syn keyword smclCCLword sysdir_updates contained
|
||||
syn keyword smclCCLword sysdir_base contained
|
||||
syn keyword smclCCLword sysdir_site contained
|
||||
syn keyword smclCCLword sysdir_plus contained
|
||||
syn keyword smclCCLword sysdir_personal contained
|
||||
syn keyword smclCCLword sysdir_oldplace contained
|
||||
syn keyword smclCCLword adopath contained
|
||||
syn keyword smclCCLword pwd contained
|
||||
syn keyword smclCCLword dirsep contained
|
||||
syn keyword smclCCLword max_N_theory contained
|
||||
syn keyword smclCCLword max_N_current contained
|
||||
syn keyword smclCCLword max_k_theory contained
|
||||
syn keyword smclCCLword max_k_current contained
|
||||
syn keyword smclCCLword max_width_theory contained
|
||||
syn keyword smclCCLword max_width_current contained
|
||||
syn keyword smclCCLword max_matsize contained
|
||||
syn keyword smclCCLword min_matsize contained
|
||||
syn keyword smclCCLword max_macrolen contained
|
||||
syn keyword smclCCLword macrolen contained
|
||||
syn keyword smclCCLword max_cmdlen contained
|
||||
syn keyword smclCCLword cmdlen contained
|
||||
syn keyword smclCCLword namelen contained
|
||||
syn keyword smclCCLword mindouble contained
|
||||
syn keyword smclCCLword maxdouble contained
|
||||
syn keyword smclCCLword epsdouble contained
|
||||
syn keyword smclCCLword minfloat contained
|
||||
syn keyword smclCCLword maxfloat contained
|
||||
syn keyword smclCCLword epsfloat contained
|
||||
syn keyword smclCCLword minlong contained
|
||||
syn keyword smclCCLword maxlong contained
|
||||
syn keyword smclCCLword minint contained
|
||||
syn keyword smclCCLword maxint contained
|
||||
syn keyword smclCCLword minbyte contained
|
||||
syn keyword smclCCLword maxbyte contained
|
||||
syn keyword smclCCLword maxstrvarlen contained
|
||||
syn keyword smclCCLword memory contained
|
||||
syn keyword smclCCLword maxvar contained
|
||||
syn keyword smclCCLword matsize contained
|
||||
syn keyword smclCCLword N contained
|
||||
syn keyword smclCCLword k contained
|
||||
syn keyword smclCCLword width contained
|
||||
syn keyword smclCCLword changed contained
|
||||
syn keyword smclCCLword filename contained
|
||||
syn keyword smclCCLword filedate contained
|
||||
syn keyword smclCCLword more contained
|
||||
syn keyword smclCCLword rmsg contained
|
||||
syn keyword smclCCLword dp contained
|
||||
syn keyword smclCCLword linesize contained
|
||||
syn keyword smclCCLword pagesize contained
|
||||
syn keyword smclCCLword logtype contained
|
||||
syn keyword smclCCLword linegap contained
|
||||
syn keyword smclCCLword scrollbufsize contained
|
||||
syn keyword smclCCLword varlabelpos contained
|
||||
syn keyword smclCCLword reventries contained
|
||||
syn keyword smclCCLword graphics contained
|
||||
syn keyword smclCCLword scheme contained
|
||||
syn keyword smclCCLword printcolor contained
|
||||
syn keyword smclCCLword adosize contained
|
||||
syn keyword smclCCLword maxdb contained
|
||||
syn keyword smclCCLword virtual contained
|
||||
syn keyword smclCCLword checksum contained
|
||||
syn keyword smclCCLword timeout1 contained
|
||||
syn keyword smclCCLword timeout2 contained
|
||||
syn keyword smclCCLword httpproxy contained
|
||||
syn keyword smclCCLword h_current contained
|
||||
syn keyword smclCCLword max_matsize contained
|
||||
syn keyword smclCCLword min_matsize contained
|
||||
syn keyword smclCCLword max_macrolen contained
|
||||
syn keyword smclCCLword macrolen contained
|
||||
syn keyword smclCCLword max_cmdlen contained
|
||||
syn keyword smclCCLword cmdlen contained
|
||||
syn keyword smclCCLword namelen contained
|
||||
syn keyword smclCCLword mindouble contained
|
||||
syn keyword smclCCLword maxdouble contained
|
||||
syn keyword smclCCLword epsdouble contained
|
||||
syn keyword smclCCLword minfloat contained
|
||||
syn keyword smclCCLword maxfloat contained
|
||||
syn keyword smclCCLword epsfloat contained
|
||||
syn keyword smclCCLword minlong contained
|
||||
syn keyword smclCCLword maxlong contained
|
||||
syn keyword smclCCLword minint contained
|
||||
syn keyword smclCCLword maxint contained
|
||||
syn keyword smclCCLword minbyte contained
|
||||
syn keyword smclCCLword maxbyte contained
|
||||
syn keyword smclCCLword maxstrvarlen contained
|
||||
syn keyword smclCCLword memory contained
|
||||
syn keyword smclCCLword maxvar contained
|
||||
syn keyword smclCCLword matsize contained
|
||||
syn keyword smclCCLword N contained
|
||||
syn keyword smclCCLword k contained
|
||||
syn keyword smclCCLword width contained
|
||||
syn keyword smclCCLword changed contained
|
||||
syn keyword smclCCLword filename contained
|
||||
syn keyword smclCCLword filedate contained
|
||||
syn keyword smclCCLword more contained
|
||||
syn keyword smclCCLword rmsg contained
|
||||
syn keyword smclCCLword dp contained
|
||||
syn keyword smclCCLword linesize contained
|
||||
syn keyword smclCCLword pagesize contained
|
||||
syn keyword smclCCLword logtype contained
|
||||
syn keyword smclCCLword linegap contained
|
||||
syn keyword smclCCLword scrollbufsize contained
|
||||
syn keyword smclCCLword varlabelpos contained
|
||||
syn keyword smclCCLword reventries contained
|
||||
syn keyword smclCCLword graphics contained
|
||||
syn keyword smclCCLword scheme contained
|
||||
syn keyword smclCCLword printcolor contained
|
||||
syn keyword smclCCLword adosize contained
|
||||
syn keyword smclCCLword maxdb contained
|
||||
syn keyword smclCCLword virtual contained
|
||||
syn keyword smclCCLword checksum contained
|
||||
syn keyword smclCCLword timeout1 contained
|
||||
syn keyword smclCCLword timeout2 contained
|
||||
syn keyword smclCCLword httpproxy contained
|
||||
syn keyword smclCCLword httpproxyhost contained
|
||||
syn keyword smclCCLword httpproxyport contained
|
||||
syn keyword smclCCLword httpproxyauth contained
|
||||
syn keyword smclCCLword httpproxyuser contained
|
||||
syn keyword smclCCLword httpproxypw contained
|
||||
syn keyword smclCCLword trace contained
|
||||
syn keyword smclCCLword tracedepth contained
|
||||
syn keyword smclCCLword tracesep contained
|
||||
syn keyword smclCCLword traceindent contained
|
||||
syn keyword smclCCLword traceexapnd contained
|
||||
syn keyword smclCCLword tracenumber contained
|
||||
syn keyword smclCCLword type contained
|
||||
syn keyword smclCCLword level contained
|
||||
syn keyword smclCCLword seed contained
|
||||
syn keyword smclCCLword searchdefault contained
|
||||
syn keyword smclCCLword pi contained
|
||||
syn keyword smclCCLword rc contained
|
||||
|
||||
" Directive for the contant and current-value class
|
||||
syn region smclCCL start=/{ccl / end=/}/ oneline contains=smclCCLword
|
||||
|
||||
" The order of the following syntax definitions is roughly that of the on-line
|
||||
" documentation for smcl in Stata, from within Stata see help smcl.
|
||||
|
||||
" Format directives for line and paragraph modes
|
||||
syn match smclFormat /{smcl}/
|
||||
syn match smclFormat /{sf\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{it\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{bf\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{inp\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{input\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{err\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{error\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{res\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{result\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{txt\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{text\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{com\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{cmd\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{cmdab:[^:}]\+:[^:}()]*\(\|:\|:(\|:()\)}/
|
||||
syn match smclFormat /{hi\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{hilite\(\|:[^}]\+\)}/
|
||||
syn match smclFormat /{ul \(on\|off\)}/
|
||||
syn match smclFormat /{ul:[^}]\+}/
|
||||
syn match smclFormat /{hline\(\| \d\+\| -\d\+\|:[^}]\+\)}/
|
||||
syn match smclFormat /{dup \d\+:[^}]\+}/
|
||||
syn match smclFormat /{c [^}]\+}/
|
||||
syn match smclFormat /{char [^}]\+}/
|
||||
syn match smclFormat /{reset}/
|
||||
|
||||
" Formatting directives for line mode
|
||||
syn match smclFormat /{title:[^}]\+}/
|
||||
syn match smclFormat /{center:[^}]\+}/
|
||||
syn match smclFormat /{centre:[^}]\+}/
|
||||
syn match smclFormat /{center \d\+:[^}]\+}/
|
||||
syn match smclFormat /{centre \d\+:[^}]\+}/
|
||||
syn match smclFormat /{right:[^}]\+}/
|
||||
syn match smclFormat /{lalign \d\+:[^}]\+}/
|
||||
syn match smclFormat /{ralign \d\+:[^}]\+}/
|
||||
syn match smclFormat /{\.\.\.}/
|
||||
syn match smclFormat /{col \d\+}/
|
||||
syn match smclFormat /{space \d\+}/
|
||||
syn match smclFormat /{tab}/
|
||||
|
||||
" Formatting directives for paragraph mode
|
||||
syn match smclFormat /{bind:[^}]\+}/
|
||||
syn match smclFormat /{break}/
|
||||
|
||||
syn match smclFormat /{p}/
|
||||
syn match smclFormat /{p \d\+}/
|
||||
syn match smclFormat /{p \d\+ \d\+}/
|
||||
syn match smclFormat /{p \d\+ \d\+ \d\+}/
|
||||
syn match smclFormat /{pstd}/
|
||||
syn match smclFormat /{psee}/
|
||||
syn match smclFormat /{phang\(\|2\|3\)}/
|
||||
syn match smclFormat /{pmore\(\|2\|3\)}/
|
||||
syn match smclFormat /{pin\(\|2\|3\)}/
|
||||
syn match smclFormat /{p_end}/
|
||||
|
||||
syn match smclFormat /{opt \w\+\(\|:\w\+\)\(\|([^)}]*)\)}/
|
||||
|
||||
syn match smclFormat /{opth \w*\(\|:\w\+\)(\w*)}/
|
||||
syn match smclFormat /{opth "\w\+\((\w\+:[^)}]\+)\)"}/
|
||||
syn match smclFormat /{opth \w\+:\w\+(\w\+:[^)}]\+)}/
|
||||
|
||||
syn match smclFormat /{dlgtab\s*\(\|\d\+\|\d\+\s\+\d\+\):[^}]\+}/
|
||||
|
||||
syn match smclFormat /{p2colset\s\+\d\+\s\+\d\+\s\+\d\+\s\+\d\+}/
|
||||
syn match smclFormat /{p2col\s\+:[^{}]*}.*{p_end}/
|
||||
syn match smclFormat /{p2col\s\+:{[^{}]*}}.*{p_end}/
|
||||
syn match smclFormat /{p2coldent\s*:[^{}]*}.*{p_end}/
|
||||
syn match smclFormat /{p2coldent\s*:{[^{}]*}}.*{p_end}/
|
||||
syn match smclFormat /{p2line\s*\(\|\d\+\s\+\d\+\)}/
|
||||
syn match smclFormat /{p2colreset}/
|
||||
|
||||
syn match smclFormat /{synoptset\s\+\d\+\s\+\w\+}/
|
||||
syn match smclFormat /{synopt\s*:[^{}]*}.*{p_end}/
|
||||
syn match smclFormat /{synopt\s*:{[^{}]*}}.*{p_end}/
|
||||
syn match smclFormat /{syntab\s*:[^{}]*}/
|
||||
syn match smclFormat /{synopthdr}/
|
||||
syn match smclFormat /{synoptline}/
|
||||
|
||||
" Link directive for line and paragraph modes
|
||||
syn match smclLink /{help [^}]\+}/
|
||||
syn match smclLink /{helpb [^}]\+}/
|
||||
syn match smclLink /{help_d:[^}]\+}/
|
||||
syn match smclLink /{search [^}]\+}/
|
||||
syn match smclLink /{search_d:[^}]\+}/
|
||||
syn match smclLink /{browse [^}]\+}/
|
||||
syn match smclLink /{view [^}]\+}/
|
||||
syn match smclLink /{view_d:[^}]\+}/
|
||||
syn match smclLink /{news:[^}]\+}/
|
||||
syn match smclLink /{net [^}]\+}/
|
||||
syn match smclLink /{net_d:[^}]\+}/
|
||||
syn match smclLink /{netfrom_d:[^}]\+}/
|
||||
syn match smclLink /{ado [^}]\+}/
|
||||
syn match smclLink /{ado_d:[^}]\+}/
|
||||
syn match smclLink /{update [^}]\+}/
|
||||
syn match smclLink /{update_d:[^}]\+}/
|
||||
syn match smclLink /{dialog [^}]\+}/
|
||||
syn match smclLink /{back:[^}]\+}/
|
||||
syn match smclLink /{clearmore:[^}]\+}/
|
||||
syn match smclLink /{stata [^}]\+}/
|
||||
|
||||
syn match smclLink /{newvar\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{var\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{varname\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{vars\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{varlist\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{depvar\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{depvars\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{depvarlist\(\|:[^}]\+\)}/
|
||||
syn match smclLink /{indepvars\(\|:[^}]\+\)}/
|
||||
|
||||
syn match smclLink /{dtype}/
|
||||
syn match smclLink /{ifin}/
|
||||
syn match smclLink /{weight}/
|
||||
|
||||
" Comment
|
||||
syn region smclComment start=/{\*/ end=/}/ oneline
|
||||
|
||||
" Strings
|
||||
syn region smclString matchgroup=Nothing start=/"/ end=/"/ oneline
|
||||
syn region smclEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=smclEString
|
||||
|
||||
" assign highlight groups
|
||||
|
||||
hi def link smclEString smclString
|
||||
|
||||
hi def link smclCCLword Statement
|
||||
hi def link smclCCL Type
|
||||
hi def link smclFormat Statement
|
||||
hi def link smclLink Underlined
|
||||
hi def link smclComment Comment
|
||||
hi def link smclString String
|
||||
|
||||
let b:current_syntax = "stata_smcl"
|
||||
|
||||
" vim: ts=8
|
||||
449
runtime/syntax/stata.vim
Normal file
449
runtime/syntax/stata.vim
Normal file
@ -0,0 +1,449 @@
|
||||
" stata.vim -- Vim syntax file for Stata do, ado, and class files.
|
||||
" Language: Stata and/or Mata
|
||||
" Maintainer: Jeff Pitblado <jpitblado@stata.com>
|
||||
" Last Change: 14apr2006
|
||||
" Version: 1.1.1
|
||||
" Location: http://www.stata.com/users/jpitblado/files/vimfiles/syntax/stata.vim
|
||||
|
||||
" Log:
|
||||
" 14apr2006 renamed syntax groups st* to stata*
|
||||
" 'syntax clear' only under version control
|
||||
" check for 'b:current_syntax', removed 'did_stat_syntax_inits'
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax case match
|
||||
|
||||
" comments - single line
|
||||
" note that the triple slash continuing line comment comes free
|
||||
syn region stataStarComment start=/^\s*\*/ end=/$/ contains=stataComment oneline
|
||||
syn region stataSlashComment start="\s//" end=/$/ contains=stataComment oneline
|
||||
syn region stataSlashComment start="^//" end=/$/ contains=stataComment oneline
|
||||
" comments - multiple line
|
||||
syn region stataComment start="/\*" end="\*/" contains=stataComment
|
||||
|
||||
" global macros - simple case
|
||||
syn match stataGlobal /\$\a\w*/
|
||||
" global macros - general case
|
||||
syn region stataGlobal start=/\${/ end=/}/ oneline contains=@stataMacroGroup
|
||||
" local macros - general case
|
||||
syn region stataLocal start=/`/ end=/'/ oneline contains=@stataMacroGroup
|
||||
|
||||
" numeric formats
|
||||
syn match stataFormat /%-\=\d\+\.\d\+[efg]c\=/
|
||||
" numeric hex format
|
||||
syn match stataFormat /%-\=21x/
|
||||
" string format
|
||||
syn match stataFormat /%\(\|-\|\~\)\d\+s/
|
||||
|
||||
" Statements
|
||||
syn keyword stataConditional else if
|
||||
syn keyword stataRepeat foreach
|
||||
syn keyword stataRepeat forv[alues]
|
||||
syn keyword stataRepeat while
|
||||
|
||||
" Common programming commands
|
||||
syn keyword stataCommand about
|
||||
syn keyword stataCommand adopath
|
||||
syn keyword stataCommand adoupdate
|
||||
syn keyword stataCommand assert
|
||||
syn keyword stataCommand break
|
||||
syn keyword stataCommand by
|
||||
syn keyword stataCommand cap[ture]
|
||||
syn keyword stataCommand cd
|
||||
syn keyword stataCommand chdir
|
||||
syn keyword stataCommand checksum
|
||||
syn keyword stataCommand class
|
||||
syn keyword stataCommand classutil
|
||||
syn keyword stataCommand compress
|
||||
syn keyword stataCommand conf[irm]
|
||||
syn keyword stataCommand conren
|
||||
syn keyword stataCommand continue
|
||||
syn keyword stataCommand cou[nt]
|
||||
syn keyword stataCommand cscript
|
||||
syn keyword stataCommand cscript_log
|
||||
syn keyword stataCommand #delimit
|
||||
syn keyword stataCommand d[escribe]
|
||||
syn keyword stataCommand dir
|
||||
syn keyword stataCommand discard
|
||||
syn keyword stataCommand di[splay]
|
||||
syn keyword stataCommand do
|
||||
syn keyword stataCommand doedit
|
||||
syn keyword stataCommand drop
|
||||
syn keyword stataCommand edit
|
||||
syn keyword stataCommand end
|
||||
syn keyword stataCommand erase
|
||||
syn keyword stataCommand eret[urn]
|
||||
syn keyword stataCommand err[or]
|
||||
syn keyword stataCommand e[xit]
|
||||
syn keyword stataCommand expand
|
||||
syn keyword stataCommand expandcl
|
||||
syn keyword stataCommand file
|
||||
syn keyword stataCommand findfile
|
||||
syn keyword stataCommand format
|
||||
syn keyword stataCommand g[enerate]
|
||||
syn keyword stataCommand gettoken
|
||||
syn keyword stataCommand gl[obal]
|
||||
syn keyword stataCommand help
|
||||
syn keyword stataCommand hexdump
|
||||
syn keyword stataCommand include
|
||||
syn keyword stataCommand infile
|
||||
syn keyword stataCommand infix
|
||||
syn keyword stataCommand input
|
||||
syn keyword stataCommand insheet
|
||||
syn keyword stataCommand joinby
|
||||
syn keyword stataCommand la[bel]
|
||||
syn keyword stataCommand levelsof
|
||||
syn keyword stataCommand list
|
||||
syn keyword stataCommand loc[al]
|
||||
syn keyword stataCommand log
|
||||
syn keyword stataCommand ma[cro]
|
||||
syn keyword stataCommand mark
|
||||
syn keyword stataCommand markout
|
||||
syn keyword stataCommand marksample
|
||||
syn keyword stataCommand mata
|
||||
syn keyword stataCommand matrix
|
||||
syn keyword stataCommand memory
|
||||
syn keyword stataCommand merge
|
||||
syn keyword stataCommand mkdir
|
||||
syn keyword stataCommand more
|
||||
syn keyword stataCommand net
|
||||
syn keyword stataCommand nobreak
|
||||
syn keyword stataCommand n[oisily]
|
||||
syn keyword stataCommand note[s]
|
||||
syn keyword stataCommand numlist
|
||||
syn keyword stataCommand outfile
|
||||
syn keyword stataCommand outsheet
|
||||
syn keyword stataCommand _parse
|
||||
syn keyword stataCommand pause
|
||||
syn keyword stataCommand plugin
|
||||
syn keyword stataCommand post
|
||||
syn keyword stataCommand postclose
|
||||
syn keyword stataCommand postfile
|
||||
syn keyword stataCommand preserve
|
||||
syn keyword stataCommand print
|
||||
syn keyword stataCommand printer
|
||||
syn keyword stataCommand profiler
|
||||
syn keyword stataCommand pr[ogram]
|
||||
syn keyword stataCommand q[uery]
|
||||
syn keyword stataCommand qui[etly]
|
||||
syn keyword stataCommand rcof
|
||||
syn keyword stataCommand reg[ress]
|
||||
syn keyword stataCommand rename
|
||||
syn keyword stataCommand repeat
|
||||
syn keyword stataCommand replace
|
||||
syn keyword stataCommand reshape
|
||||
syn keyword stataCommand ret[urn]
|
||||
syn keyword stataCommand _rmcoll
|
||||
syn keyword stataCommand _rmcoll
|
||||
syn keyword stataCommand _rmcollright
|
||||
syn keyword stataCommand rmdir
|
||||
syn keyword stataCommand _robust
|
||||
syn keyword stataCommand save
|
||||
syn keyword stataCommand sca[lar]
|
||||
syn keyword stataCommand search
|
||||
syn keyword stataCommand serset
|
||||
syn keyword stataCommand set
|
||||
syn keyword stataCommand shell
|
||||
syn keyword stataCommand sleep
|
||||
syn keyword stataCommand sort
|
||||
syn keyword stataCommand split
|
||||
syn keyword stataCommand sret[urn]
|
||||
syn keyword stataCommand ssc
|
||||
syn keyword stataCommand su[mmarize]
|
||||
syn keyword stataCommand syntax
|
||||
syn keyword stataCommand sysdescribe
|
||||
syn keyword stataCommand sysdir
|
||||
syn keyword stataCommand sysuse
|
||||
syn keyword stataCommand token[ize]
|
||||
syn keyword stataCommand translate
|
||||
syn keyword stataCommand type
|
||||
syn keyword stataCommand unab
|
||||
syn keyword stataCommand unabcmd
|
||||
syn keyword stataCommand update
|
||||
syn keyword stataCommand use
|
||||
syn keyword stataCommand vers[ion]
|
||||
syn keyword stataCommand view
|
||||
syn keyword stataCommand viewsource
|
||||
syn keyword stataCommand webdescribe
|
||||
syn keyword stataCommand webseek
|
||||
syn keyword stataCommand webuse
|
||||
syn keyword stataCommand which
|
||||
syn keyword stataCommand who
|
||||
syn keyword stataCommand window
|
||||
|
||||
" Literals
|
||||
syn match stataQuote /"/
|
||||
syn region stataEString matchgroup=Nothing start=/`"/ end=/"'/ oneline contains=@stataMacroGroup,stataQuote,stataString,stataEString
|
||||
syn region stataString matchgroup=Nothing start=/"/ end=/"/ oneline contains=@stataMacroGroup
|
||||
|
||||
" define clusters
|
||||
syn cluster stataFuncGroup contains=@stataMacroGroup,stataFunc,stataString,stataEstring
|
||||
syn cluster stataMacroGroup contains=stataGlobal,stataLocal
|
||||
syn cluster stataParenGroup contains=stataParenError,stataBracketError,stataBraceError,stataSpecial,stataFormat
|
||||
|
||||
" Stata functions
|
||||
" Math
|
||||
syn region stataFunc matchgroup=Function start=/abs(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/acos(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/asin(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/atan(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/atan2(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/atanh(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/ceil(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/cloglog(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/comb(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/cos(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/digamma(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/exp(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/floor(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/int(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invcloglog(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invlogit(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/ln(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/lnfact(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/lnfactorial(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/lngamma(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/log(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/log10(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/logit(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/max(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/mod(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/reldif(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/round(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/sign(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/sin(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/sqrt(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/sum(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/tan(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/tanh(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/trigamma(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/trunc(/ end=/)/ contains=@stataFuncGroup
|
||||
" Probability distriubtions and density functions
|
||||
syn region stataFunc matchgroup=Function start=/betaden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/Binomial(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/binorm(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/binormal(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/chi2(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/chi2tail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dgammapda(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dgammapdada(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dgammapdadx(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dgammapdx(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dgammapdxdx(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/F(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/Fden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/Ftail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/gammaden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/gammap(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/ibeta(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invbinomial(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invchi2(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invchi2tail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invF(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invFtail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invgammap(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invibeta(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invnchi2(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invFtail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invibeta(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invnorm(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invnormal(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invttail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/lnnormal(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/lnnormalden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/nbetaden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/nchi2(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/nFden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/nFtail(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/nibeta(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/norm(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/normal(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/normalden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/normden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/npnchi2(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/tden(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/ttail(/ end=/)/ contains=@stataFuncGroup
|
||||
" Random numbers
|
||||
syn region stataFunc matchgroup=Function start=/uniform(/ end=/)/ contains=@stataFuncGroup
|
||||
" String
|
||||
syn region stataFunc matchgroup=Function start=/abbrev(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/hchar(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/indexnot(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/itrim(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/length(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/lower(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/ltrim(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/plural(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/proper(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/real(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/regexm(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/regexr(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/regexs(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/reverse(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/rtrim(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/string(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/strlen(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/strmatch(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/strpos(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/subinstr(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/subinword(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/substr(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/trim(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/upper(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/word(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/wordcount(/ end=/)/ contains=@stataFuncGroup
|
||||
" Programming
|
||||
syn region stataFunc matchgroup=Function start=/autocode(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/byteorder(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/c(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/_caller(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/chop(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/clip(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/cond(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/e(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/epsdouble(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/epsfloat(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/float(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/has_eprop(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/has_eprop(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/inlist(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/inrange(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/irecode(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/matrix(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/maxbyte(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/maxdouble(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/maxfloat(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/maxint(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/maxlong(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/mi(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/minbyte(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/mindouble(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/minfloat(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/minint(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/minlong(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/missing(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/r(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/recode(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/replay(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/return(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/s(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/scalar(/ end=/)/ contains=@stataFuncGroup
|
||||
" Date
|
||||
syn region stataFunc matchgroup=Function start=/d(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/date(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/day(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dow(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/doy(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/halfyear(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/mdy(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/month(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/quarter(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/week(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/year(/ end=/)/ contains=@stataFuncGroup
|
||||
" Time-series
|
||||
syn region stataFunc matchgroup=Function start=/daily(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/halfyearly(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/monthly(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/quarterly(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/weekly(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/yearly(/ end=/)/ contains=@stataFuncGroup
|
||||
"
|
||||
syn region stataFunc matchgroup=Function start=/yh(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/ym(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/yq(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/yw(/ end=/)/ contains=@stataFuncGroup
|
||||
"
|
||||
syn region stataFunc matchgroup=Function start=/d(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/h(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/m(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/q(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/w(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/y(/ end=/)/ contains=@stataFuncGroup
|
||||
"
|
||||
syn region stataFunc matchgroup=Function start=/dofd(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dofh(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dofm(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dofq(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dofw(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/dofy(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/hofd(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/mofd(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/qofd(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/wofd(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/yofd(/ end=/)/ contains=@stataFuncGroup
|
||||
"
|
||||
syn region stataFunc matchgroup=Function start=/tin(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/twithin(/ end=/)/ contains=@stataFuncGroup
|
||||
" Matrix
|
||||
syn region stataFunc matchgroup=Function start=/colnumb(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/colsof(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/det(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/diag0cnt(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/el(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/issymmetric(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/matmissing(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/mreldif(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/rownumb(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/rowsof(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/trace(/ end=/)/ contains=@stataFuncGroup
|
||||
"
|
||||
syn region stataFunc matchgroup=Function start=/cholsky(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/corr(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/diag(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/get(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/hadamard(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/I(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/inv(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/invsym(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/J(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/matuniform(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/nullmat(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/sweep(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/vec(/ end=/)/ contains=@stataFuncGroup
|
||||
syn region stataFunc matchgroup=Function start=/vecdiag(/ end=/)/ contains=@stataFuncGroup
|
||||
|
||||
" Errors to catch
|
||||
" taken from $VIMRUNTIME/syntax/c.vim
|
||||
" catch errors caused by wrong parenthesis, braces and brackets
|
||||
syn region stataParen transparent start=/(/ end=/)/ contains=ALLBUT,@stataParenGroup,stataErrInBracket,stataErrInBrace
|
||||
syn region stataBracket transparent start=/\[/ end=/]/ contains=ALLBUT,@stataParenGroup,stataErrInParen,stataErrInBrace
|
||||
syn region stataBrace transparent start=/{/ end=/}/ contains=ALLBUT,@stataParenGroup,stataErrInParen,stataErrInBracket
|
||||
syn match stataParenError /[\])}]/
|
||||
syn match stataBracketError /]/
|
||||
syn match stataBraceError /}/
|
||||
syn match stataErrInParen contained /[\]{}]/
|
||||
syn match stataErrInBracket contained /[){}]/
|
||||
syn match stataErrInBrace contained /[)\]]/
|
||||
|
||||
" assign highlight groups
|
||||
hi def link stataBraceError stataError
|
||||
hi def link stataBracketError stataError
|
||||
hi def link stataErrInBrace stataError
|
||||
hi def link stataErrInBracket stataError
|
||||
hi def link stataErrInParen stataError
|
||||
hi def link stataEString stataString
|
||||
hi def link stataFormat stataSpecial
|
||||
hi def link stataGlobal stataMacro
|
||||
hi def link stataLocal stataMacro
|
||||
hi def link stataParenError stataError
|
||||
hi def link stataSlashComment stataComment
|
||||
hi def link stataStarComment stataComment
|
||||
|
||||
hi def link stataCommand Define
|
||||
hi def link stataComment Comment
|
||||
hi def link stataConditional Conditional
|
||||
hi def link stataError Error
|
||||
hi def link stataFunc None
|
||||
hi def link stataMacro Define
|
||||
hi def link stataRepeat Repeat
|
||||
hi def link stataSpecial SpecialChar
|
||||
hi def link stataString String
|
||||
|
||||
let b:current_syntax = "stata"
|
||||
|
||||
" vim: ts=8
|
||||
Reference in New Issue
Block a user