diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-28 21:08:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-28 21:08:56 +0000 |
commit | d2cec5b043361ee798a0522244135f4ea87838f6 (patch) | |
tree | 3ad43aed8a8c373f85a2a3adf286b045c14f6cfe /runtime/syntax | |
parent | 607a95ed81973faab2e1c3d9c91822082694fdc3 (diff) | |
download | vim-d2cec5b043361ee798a0522244135f4ea87838f6.zip |
updated for version 7.0c02
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/coretex.vim | 377 | ||||
-rw-r--r-- | runtime/syntax/debsources.vim | 40 | ||||
-rw-r--r-- | runtime/syntax/plaintex.vim | 166 |
3 files changed, 583 insertions, 0 deletions
diff --git a/runtime/syntax/coretex.vim b/runtime/syntax/coretex.vim new file mode 100644 index 000000000..adb77bbc1 --- /dev/null +++ b/runtime/syntax/coretex.vim @@ -0,0 +1,377 @@ +" Vim syntax file +" Language: TeX (core definition) +" Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-03-26 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +" This follows the grouping (sort of) found at +" http://www.tug.org/utilities/plain/cseq.html#top-fam + +syn keyword coretexTodo TODO FIXME XXX NOTE + +syn match coretexComment display contains=coretexTodo + \ '\\\@<!\%(\\\\\)*\zs%.*$' + +syn match coretexDimension display contains=@NoSpell + \ '[+-]\=\s*\%(\d\+\%([.,]\d*\)\=\|[.,]\d\+\)\s*\%(true\)\=\s*\%(p[tc]\|in\|bp\|c[mc]\|m[mu]\|dd\|sp\|e[mx]\)\>' + +syn cluster coretexBox + \ contains=coretexBoxCommand,coretexBoxInternalQuantity, + \ coretexBoxParameterDimen,coretexBoxParameterInteger, + \ coretexBoxParameterToken + +syn cluster coretexCharacter + \ contains=coretexCharacterCommand,coretexCharacterInternalQuantity, + \ coretexCharacterParameterInteger + +syn cluster coretexDebugging + \ contains=coretexDebuggingCommand,coretexDebuggingParameterInteger, + \ coretexDebuggingParameterToken + +syn cluster coretexFileIO + \ contains=coretexFileIOCommand,coretexFileIOInternalQuantity, + \ coretexFileIOParameterToken + +syn cluster coretexFonts + \ contains=coretexFontsCommand,coretexFontsInternalQuantity + +syn cluster coretexGlue + \ contains=coretexGlueCommand,coretexGlueDerivedCommand + +syn cluster coretexHyphenation + \ contains=coretexHyphenationCommand,coretexHyphenationDerivedCommand, + \ coretexHyphenationInternalQuantity,coretexHyphenationParameterInteger + +syn cluster coretexInserts + \ contains=coretexInsertsCommand,coretexInsertsParameterDimen, + \ coretexInsertsParameterGlue,coretexInsertsParameterInteger + +syn cluster coretexJob + \ contains=coretexJobCommand,coretexJobInternalQuantity, + \ coretexJobParameterInteger + +syn cluster coretexKern + \ contains=coretexKernCommand,coretexKernInternalQuantity + +syn cluster coretexLogic + \ contains=coretexLogicCommand + +syn cluster coretexMacro + \ contains=coretexMacroCommand,coretexMacroDerivedCommand, + \ coretexMacroParameterInteger + +syn cluster coretexMarks + \ contains=coretexMarksCommand + +syn cluster coretexMath + \ contains=coretexMathCommand,coretexMathDerivedCommand, + \ coretexMathInternalQuantity,coretexMathParameterDimen, + \ coretexMathParameterGlue,coretexMathParameterInteger, + \ coretexMathParameterMuglue,coretexMathParameterToken + +syn cluster coretexPage + \ contains=coretexPageInternalQuantity,coretexPageParameterDimen, + \ coretexPageParameterGlue + +syn cluster coretexParagraph + \ contains=coretexParagraphCommand,coretexParagraphInternalQuantity, + \ coretexParagraphParameterDimen,coretexParagraphParameterGlue, + \ coretexParagraphParameterInteger,coretexParagraphParameterToken + +syn cluster coretexPenalties + \ contains=coretexPenaltiesCommand,coretexPenaltiesInternalQuantity, + \ coretexPenaltiesParameterInteger + +syn cluster coretexRegisters + \ contains=coretexRegistersCommand,coretexRegistersInternalQuantity + +syn cluster coretexTables + \ contains=coretexTablesCommand,coretexTablesParameterGlue, + \ coretexTablesParameterToken + +syn cluster coretexCommand + \ contains=coretexBoxCommand,coretexCharacterCommand, + \ coretexDebuggingCommand,coretexFileIOCommand, + \ coretexFontsCommand,coretexGlueCommand, + \ coretexHyphenationCommand,coretexInsertsCommand, + \ coretexJobCommand,coretexKernCommand,coretexLogicCommand, + \ coretexMacroCommand,coretexMarksCommand,coretexMathCommand, + \ coretexParagraphCommand,coretexPenaltiesCommand,coretexRegistersCommand, + \ coretexTablesCommand + +syn match coretexBoxCommand display contains=@NoSpell + \ '\\\%([hv]\=box\|[cx]\=leaders\|copy\|[hv]rule\|lastbox\|setbox\|un[hv]\%(box\|copy\)\|vtop\)\>' +syn match coretexCharacterCommand display contains=@NoSpell + \ '\\\%([] ]\|\%(^^M\|accent\|char\|\%(lower\|upper\)case\|number\|romannumeral\|string\)\>\)' +syn match coretexDebuggingCommand display contains=@NoSpell + \ '\\\%(\%(batch\|\%(non\|error\)stop\|scroll\)mode\|\%(err\)\=message\|meaning\|show\%(box\%(breadth\|depth\)\=\|lists\|the\)\)\>' +syn match coretexFileIOCommand display contains=@NoSpell + \ '\\\%(\%(close\|open\)\%(in\|out\)\|endinput\|immediate\|input\|read\|shipout\|special\|write\)\>' +syn match coretexFontsCommand display contains=@NoSpell + \ '\\\%(/\|fontname\)\>' +syn match coretexGlueCommand display contains=@NoSpell + \ '\\\%([hv]\|un\)skip\>' +syn match coretexHyphenationCommand display contains=@NoSpell + \ '\\\%(discretionary\|hyphenation\|patterns\|setlanguage\)\>' +syn match coretexInsertsCommand display contains=@NoSpell + \ '\\\%(insert\|split\%(bot\|first\)mark\|vsplit\)\>' +syn match coretexJobCommand display contains=@NoSpell + \ '\\\%(dump\|end\|jobname\)\>' +syn match coretexKernCommand display contains=@NoSpell + \ '\\\%(kern\|lower\|move\%(left\|right\)\|raise\|unkern\)\>' +syn match coretexLogicCommand display contains=@NoSpell + \ '\\\%(else\|fi\|if[a-zA-Z@]\+\|or\)\>' +" \ '\\\%(else\|fi\|if\%(case\|cat\|dim\|eof\|false\|[hv]box\|[hmv]mode\|inner\|num\|odd\|true\|void\|x\)\=\|or\)\>' +syn match coretexMacroCommand display contains=@NoSpell + \ '\\\%(after\%(assignment\|group\)\|\%(begin\|end\)group\|\%(end\)\=csname\|e\=def\|expandafter\|futurelet\|global\|let\|long\|noexpand\|outer\|relax\|the\)\>' +syn match coretexMarksCommand display contains=@NoSpell + \ '\\\%(bot\|first\|top\)\=mark\>' +syn match coretexMathCommand display contains=@NoSpell + \ '\\\%(abovewithdelims\|delimiter\|display\%(limits\|style\)\|l\=eqno\|left\|\%(no\)\=limits\|math\%(accent\|bin\|char\|choice\|close\|code\|inner\|op\|open\|ord\|punct\|rel\)\|mkern\|mskip\|muskipdef\|nonscript\|\%(over\|under\)line\|radical\|right\|\%(\%(script\)\{1,2}\|text\)style\|vcenter\)\>' +syn match coretexParagraphCommand display contains=@NoSpell + \ '\\\%(ignorespaces\|indent\|no\%(boundary\|indent\)\|par\|vadjust\)\>' +syn match coretexPenaltiesCommand display contains=@NoSpell + \ '\\\%(un\)\=penalty\>' +syn match coretexRegistersCommand display contains=@NoSpell + \ '\\\%(advance\|\%(count\|dimen\|skip\|toks\)def\|divide\|multiply\)\>' +syn match coretexTablesCommand display contains=@NoSpell + \ '\\\%(cr\|crcr\|[hv]align\|noalign\|omit\|span\)\>' + +syn cluster coretexDerivedCommand + \ contains=coretexGlueDerivedCommand,coretexHyphenationDerivedCommand, + \ coretexMacroDerivedCommand,coretexMathDerivedCommand + +syn match coretexGlueDerivedCommand display contains=@NoSpell + \ '\\\%([hv]fil\%(l\|neg\)\=\|[hv]ss\)\>' +syn match coretexHyphenationDerivedCommand display contains=@NoSpell + \ '\\-' +syn match coretexMacroDerivedCommand display contains=@NoSpell + \ '\\[gx]def\>' +syn match coretexMathDerivedCommand display contains=@NoSpell + \ '\\\%(above\|atop\%(withdelims\)\=\|mathchardef\|over\|overwithdelims\)\>' + +syn cluster coretexInternalQuantity + \ contains=coretexBoxInternalQuantity,coretexCharacterInternalQuantity, + \ coretexFileIOInternalQuantity,coretexFontsInternalQuantity, + \ coretexHyphenationInternalQuantity,coretexJobInternalQuantity, + \ coretexKernInternalQuantity,coretexMathInternalQuantity, + \ coretexPageInternalQuantity,coretexParagraphInternalQuantity, + \ coretexPenaltiesInternalQuantity,coretexRegistersInternalQuantity + +syn match coretexBoxInternalQuantity display contains=@NoSpell + \ '\\\%(badness\|dp\|ht\|prevdepth\|wd\)\>' +syn match coretexCharacterInternalQuantity display contains=@NoSpell + \ '\\\%(catcode\|chardef\|\%([ul]c\|sf\)code\)\>' +syn match coretexFileIOInternalQuantity display contains=@NoSpell + \ '\\inputlineno\>' +syn match coretexFontsInternalQuantity display contains=@NoSpell + \ '\\\%(font\%(dimen\)\=\|nullfont\)\>' +syn match coretexHyphenationInternalQuantity display contains=@NoSpell + \ '\\hyphenchar\>' +syn match coretexJobInternalQuantity display contains=@NoSpell + \ '\\deadcycles\>' +syn match coretexKernInternalQuantity display contains=@NoSpell + \ '\\lastkern\>' +syn match coretexMathInternalQuantity display contains=@NoSpell + \ '\\\%(delcode\|mathcode\|muskip\|\%(\%(script\)\{1,2}\|text\)font\|skewchar\)\>' +syn match coretexPageInternalQuantity display contains=@NoSpell + \ '\\page\%(depth\|fil\{1,3}stretch\|goal\|shrink\|stretch\|total\)\>' +syn match coretexParagraphInternalQuantity display contains=@NoSpell + \ '\\\%(prevgraf\|spacefactor\)\>' +syn match coretexPenaltiesInternalQuantity display contains=@NoSpell + \ '\\lastpenalty\>' +syn match coretexRegistersInternalQuantity display contains=@NoSpell + \ '\\\%(count\|dimen\|skip\|toks\)\d\+\>' + +syn cluster coretexParameterDimen + \ contains=coretexBoxParameterDimen,coretexInsertsParameterDimen, + \ coretexMathParameterDimen,coretexPageParameterDimen, + \ coretexParagraphParameterDimen + +syn match coretexBoxParameterDimen display contains=@NoSpell + \ '\\\%(boxmaxdepth\|[hv]fuzz\|overfullrule\)\>' +syn match coretexInsertsParameterDimen display contains=@NoSpell + \ '\\splitmaxdepth\>' +syn match coretexMathParameterDimen display contains=@NoSpell + \ '\\\%(delimitershortfall\|display\%(indent\|width\)\|mathsurround\|nulldelimiterspace\|predisplaysize\|scriptspace\)\>' +syn match coretexPageParameterDimen display contains=@NoSpell + \ '\\\%([hv]offset\|maxdepth\|vsize\)\>' +syn match coretexParagraphParameterDimen display contains=@NoSpell + \ '\\\%(emergencystretch\|\%(hang\|par\)indent\|hsize\|lineskiplimit\)\>' + +syn cluster coretexParameterGlue + \ contains=coretexInsertsParameterGlue,coretexMathParameterGlue, + \ coretexPageParameterGlue,coretexParagraphParameterGlue, + \ coretexTablesParameterGlue + +syn match coretexInsertsParameterGlue display contains=@NoSpell + \ '\\splittopskip\>' +syn match coretexMathParameterGlue display contains=@NoSpell + \ '\\\%(above\|below\)display\%(short\)\=skip\>' +syn match coretexPageParameterGlue display contains=@NoSpell + \ '\\topskip\>' +syn match coretexParagraphParameterGlue display contains=@NoSpell + \ '\\\%(baseline\|left\|line\|par\%(fill\)\=\|right\|x\=space\)skip\>' +syn match coretexTablesParameterGlue display contains=@NoSpell + \ '\\tabskip\>' + +syn cluster coretexParameterInteger + \ contains=coretexBoxParameterInteger,coretexCharacterParameterInteger, + \ coretexDebuggingParameterInteger,coretexHyphenationParameterInteger, + \ coretexInsertsParameterInteger,coretexJobParameterInteger, + \ coretexMacroParameterInteger,coretexMathParameterInteger, + \ coretexParagraphParameterInteger,coretexPenaltiesParameterInteger, + +syn match coretexBoxParameterInteger display contains=@NoSpell + \ '\\[hv]badness\>' +syn match coretexCharacterParameterInteger display contains=@NoSpell + \ '\\\%(\%(endline\|escape\|newline\)char\)\>' +syn match coretexDebuggingParameterInteger display contains=@NoSpell + \ '\\\%(errorcontextlines\|pausing\|tracing\%(commands\|lostchars\|macros\|online\|output\|pages\|paragraphs\|restores|stats\)\)\>' +syn match coretexHyphenationParameterInteger display contains=@NoSpell + \ '\\\%(defaulthyphenchar\|language\|\%(left\|right\)hyphenmin\|uchyph\)\>' +syn match coretexInsertsParameterInteger display contains=@NoSpell + \ '\\\%(holdinginserts\)\>' +syn match coretexJobParameterInteger display contains=@NoSpell + \ '\\\%(day\|mag\|maxdeadcycles\|month\|time\|year\)\>' +syn match coretexMacroParameterInteger display contains=@NoSpell + \ '\\globaldefs\>' +syn match coretexMathParameterInteger display contains=@NoSpell + \ '\\\%(binoppenalty\|defaultskewchar\|delimiterfactor\|displaywidowpenalty\|fam\|\%(post\|pre\)displaypenalty\|relpenalty\)\>' +syn match coretexParagraphParameterInteger display contains=@NoSpell + \ '\\\%(\%(adj\|\%(double\|final\)hyphen\)demerits\|looseness\|\%(pre\)\=tolerance\)\>' +syn match coretexPenaltiesParameterInteger display contains=@NoSpell + \ '\\\%(broken\|club\|exhyphen\|floating\|hyphen\|interline\|line\|output\|widow\)penalty\>' + +syn cluster coretexParameterMuglue + \ contains=coretexMathParameterMuglue + +syn match coretexMathParameterMuglue display contains=@NoSpell + \ '\\\%(med\|thick\|thin\)muskip\>' + +syn cluster coretexParameterDimen + \ contains=coretexBoxParameterToken,coretexDebuggingParameterToken, + \ coretexFileIOParameterToken,coretexMathParameterToken, + \ coretexParagraphParameterToken,coretexTablesParameterToken + +syn match coretexBoxParameterToken display contains=@NoSpell + \ '\\every[hv]box\>' +syn match coretexDebuggingParameterToken display contains=@NoSpell + \ '\\errhelp\>' +syn match coretexFileIOParameterToken display contains=@NoSpell + \ '\\output\>' +syn match coretexMathParameterToken display contains=@NoSpell + \ '\\every\%(display\|math\)\>' +syn match coretexParagraphParameterToken display contains=@NoSpell + \ '\\everypar\>' +syn match coretexTablesParameterToken display contains=@NoSpell + \ '\\everycr\>' + + +hi def link coretexCharacter Character +hi def link coretexNumber Number + +hi def link coretexIdentifier Identifier + +hi def link coretexStatement Statement +hi def link coretexConditional Conditional + +hi def link coretexPreProc PreProc +hi def link coretexMacro Macro + +hi def link coretexType Type + +hi def link coretexDebug Debug + +hi def link coretexTodo Todo +hi def link coretexComment Comment +hi def link coretexDimension coretexNumber + +hi def link coretexCommand coretexStatement +hi def link coretexBoxCommand coretexCommand +hi def link coretexCharacterCommand coretexCharacter +hi def link coretexDebuggingCommand coretexDebug +hi def link coretexFileIOCommand coretexCommand +hi def link coretexFontsCommand coretexType +hi def link coretexGlueCommand coretexCommand +hi def link coretexHyphenationCommand coretexCommand +hi def link coretexInsertsCommand coretexCommand +hi def link coretexJobCommand coretexPreProc +hi def link coretexKernCommand coretexCommand +hi def link coretexLogicCommand coretexConditional +hi def link coretexMacroCommand coretexMacro +hi def link coretexMarksCommand coretexCommand +hi def link coretexMathCommand coretexCommand +hi def link coretexParagraphCommand coretexCommand +hi def link coretexPenaltiesCommand coretexCommand +hi def link coretexRegistersCommand coretexCommand +hi def link coretexTablesCommand coretexCommand + +hi def link coretexDerivedCommand coretexStatement +hi def link coretexGlueDerivedCommand coretexDerivedCommand +hi def link coretexHyphenationDerivedCommand coretexDerivedCommand +hi def link coretexMacroDerivedCommand coretexDerivedCommand +hi def link coretexMathDerivedCommand coretexDerivedCommand + +hi def link coretexInternalQuantity coretexIdentifier +hi def link coretexBoxInternalQuantity coretexInternalQuantity +hi def link coretexCharacterInternalQuantity coretexInternalQuantity +hi def link coretexFileIOInternalQuantity coretexInternalQuantity +hi def link coretexFontsInternalQuantity coretexInternalQuantity +hi def link coretexHyphenationInternalQuantity coretexInternalQuantity +hi def link coretexJobInternalQuantity coretexInternalQuantity +hi def link coretexKernInternalQuantity coretexInternalQuantity +hi def link coretexMathInternalQuantity coretexInternalQuantity +hi def link coretexPageInternalQuantity coretexInternalQuantity +hi def link coretexParagraphInternalQuantity coretexInternalQuantity +hi def link coretexPenaltiesInternalQuantity coretexInternalQuantity +hi def link coretexRegistersInternalQuantity coretexInternalQuantity + +hi def link coretexParameterDimen coretexNumber +hi def link coretexBoxParameterDimen coretexParameterDimen +hi def link coretexInsertsParameterDimen coretexParameterDimen +hi def link coretexMathParameterDimen coretexParameterDimen +hi def link coretexPageParameterDimen coretexParameterDimen +hi def link coretexParagraphParameterDimen coretexParameterDimen + +hi def link coretexParameterGlue coretexNumber +hi def link coretexInsertsParameterGlue coretexParameterGlue +hi def link coretexMathParameterGlue coretexParameterGlue +hi def link coretexPageParameterGlue coretexParameterGlue +hi def link coretexParagraphParameterGlue coretexParameterGlue +hi def link coretexTablesParameterGlue coretexParameterGlue + +hi def link coretexParameterInteger coretexNumber +hi def link coretexBoxParameterInteger coretexParameterInteger +hi def link coretexCharacterParameterInteger coretexParameterInteger +hi def link coretexDebuggingParameterInteger coretexParameterInteger +hi def link coretexHyphenationParameterInteger coretexParameterInteger +hi def link coretexInsertsParameterInteger coretexParameterInteger +hi def link coretexJobParameterInteger coretexParameterInteger +hi def link coretexMacroParameterInteger coretexParameterInteger +hi def link coretexMathParameterInteger coretexParameterInteger +hi def link coretexParagraphParameterInteger coretexParameterInteger +hi def link coretexPenaltiesParameterInteger coretexParameterInteger + +hi def link coretexParameterMuglue coretexNumber +hi def link coretexMathParameterMuglue coretexParameterMuglue + +hi def link coretexParameterToken coretexIdentifier +hi def link coretexBoxParameterToken coretexParameterToken +hi def link coretexDebuggingParameterToken coretexParameterToken +hi def link coretexFileIOParameterToken coretexParameterToken +hi def link coretexMathParameterToken coretexParameterToken +hi def link coretexParagraphParameterToken coretexParameterToken +hi def link coretexTablesParameterToken coretexParameterToken + +let b:current_syntax = "coretex" + +let &cpo = s:cpo_save +unlet s:cpo_save + diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim new file mode 100644 index 000000000..c952ed82c --- /dev/null +++ b/runtime/syntax/debsources.vim @@ -0,0 +1,40 @@ +" Vim syntax file +" Language: Debian sources.list +" Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> +" Last Change: $Date$ +" URL: http://www.cacholong.nl/~matthijs/vim/syntax/debsources.vim +" $Revision$ + +" this is a very simple syntax file - I will be improving it +" add entire DEFINE syntax + +" Standard syntax initialization +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" case sensitive +syn case match + +" A bunch of useful keywords +syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\)/ + +" Match comments +syn match debsourcesComment /#.*/ + +" Match uri's +syn match debsourcesUri +\(http://\|ftp://\|file:///\)[^' <>"]\++ +syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\(woody\|sarge\|etch\|old-stable\|stable\|testing\|unstable\|sid\|experimental\|warty\|hoary\|breezy\)\([[:alnum:]_./]*\)+ + +" Associate our matches and regions with pretty colours +hi def link debsourcesLine Error +hi def link debsourcesKeyword Statement +hi def link debsourcesDistrKeyword Type +hi def link debsourcesComment Comment +hi def link debsourcesUri Constant + +let b:current_syntax = "debsources" + +" vim: ts=8 diff --git a/runtime/syntax/plaintex.vim b/runtime/syntax/plaintex.vim new file mode 100644 index 000000000..a930712a7 --- /dev/null +++ b/runtime/syntax/plaintex.vim @@ -0,0 +1,166 @@ +" Vim syntax file +" Language: TeX (plain.tex format) +" Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2006-03-26 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn match plaintexControlSequence display contains=@NoSpell + \ '\\[a-zA-Z@]\+' + +runtime! syntax/coretex.vim + +syn match plaintexComment display + \ contains=ALLBUT,coretexComment,plaintexComment + \ '^\s*%[CDM].*$' + +if exists("g:plaintex_delimiters") + syn match plaintexDelimiter display '[][{}]' +endif + +syn match plaintexRepeat display contains=@NoSpell + \ '\\\%(loop\|repeat\)\>' + +syn match plaintexCommand display contains=@NoSpell + \ '\\\%(plainoutput\|TeX\)\>' +syn match plaintexBoxCommand display contains=@NoSpell + \ '\\\%(null\|strut\)\>' +syn match plaintexCharacterCommand display contains=@NoSpell + \ /\\\%(["#$%&'.=^_`~]\|``\|''\|-\{2,3}\|[?!]`\|^^L\|\~\|\%(a[ae]\|A[AE]\|acute\|[cdHoOPStuvijlL]\|copyright\|d\=dag\|folio\|ldotp\|[lr]q\|oe\|OE\|slash\|ss\|underbar\)\>\)/ +syn match plaintexDebuggingCommand display contains=@NoSpell + \ '\\\%(showhyphens\|tracingall\|wlog\)\>' +syn match plaintexFontsCommand display contains=@NoSpell + \ '\\\%(bf\|\%(five\|seven\)\%(bf\|i\|rm\|sy\)\|it\|oldstyle\|rm\|sl\|ten\%(bf\|ex\|it\=\|rm\|sl\|sy\|tt\)\|tt\)\>' +syn match plaintexGlueCommand display contains=@NoSpell + \ '\\\%(\%(big\|en\|med\|\%(no\|off\)interline\|small\)skip\|\%(center\|left\|right\)\=line\|\%(dot\|\%(left\|right\)arrow\)fill\|[hv]glue\|[lr]lap\|q\=quad\|space\|topglue\)\>' +syn match plaintexInsertsCommand display contains=@NoSpell + \ '\\\%(\%(end\|top\)insert\|v\=footnote\)\>' +syn match plaintexJobCommand display contains=@NoSpell + \ '\\\%(bye\|fmt\%(name\|version\)\)\>' +syn match plaintexInsertsCommand display contains=@NoSpell + \ '\\\%(mid\|page\)insert\>' +syn match plaintexKernCommand display contains=@NoSpell + \ '\\\%(en\|\%(neg\)\=thin\)space\>' +syn match plaintexMacroCommand display contains=@NoSpell + \ '\\\%(active\|[be]group\|empty\)\>' +syn match plaintexPageCommand display contains=@NoSpell + \ '\\\%(\%(super\)\=eject\|nopagenumbers\|\%(normal\|ragged\)bottom\)\>' +syn match plaintexParagraphCommand display contains=@NoSpell + \ '\\\%(endgraf\|\%(non\)\=frenchspacing\|hang\|item\%(item\)\=\|narrower\|normalbaselines\|obey\%(lines\|spaces\)\|openup\|proclaim\|\%(tt\)\=raggedright\|textindent\)\>' +syn match plaintexPenaltiesCommand display contains=@NoSpell + \ '\\\%(allow\|big\|fil\|good\|med\|no\|small\)\=break\>' +syn match plaintexRegistersCommand display contains=@NoSpell + \ '\\\%(advancepageno\|new\%(box\|count\|dimen\|fam\|help\|if\|insert\|language\|muskip\|read\|skip\|toks\|write\)\)\>' +syn match plaintexTablesCommand display contains=@NoSpell + \ '&\|\\+\|\\\%(cleartabs\|endline\|hidewidth\|ialign\|multispan\|settabs\|tabalign\)\>' + +syn region plaintexMath matchgroup=plaintexMath + \ contains=@plaintexMath + \ start='\$' skip='\\\\\|\\\$' end='\$' +syn region plaintexMath matchgroup=plaintexMath + \ contains=@plaintexMath keepend + \ start='\$\$' skip='\\\\\|\\\$' end='\$\$' + +syn cluster plaintexMath + \ contains=plaintexMathCommand,plaintexMathBoxCommand, + \ plaintexMathCharacterCommand,plaintexMathDelimiter, + \ plaintexMathFontsCommand,plaintexMathLetter,plaintexMathSymbol, + \ plaintexMathFunction,plaintexMathOperator,plaintexMathPunctuation, + \ plaintexMathRelation + +syn match plaintexMathCommand display contains=@NoSpell contained + \ '\\\%([!*,;>{}|_^]\|\%([aA]rrowvert\|[bB]ig\%(g[lmr]\=\|r\)\=\|\%(border\|p\)\=matrix\|displaylines\|\%(down\|up\)bracefill\|eqalign\%(no\)\|leqalignno\|[lr]moustache\|mathpalette\|root\|s[bp]\|skew\|sqrt\)\>\)' +syn match plaintexMathBoxCommand display contains=@NoSpell contained + \ '\\\%([hv]\=phantom\|mathstrut\|smash\)\>' +syn match plaintexMathCharacterCommand display contains=@NoSpell contained + \ '\\\%(b\|bar\|breve\|check\|d\=dots\=\|grave\|hat\|[lv]dots\|tilde\|vec\|wide\%(hat\|tilde\)\)\>' +syn match plaintexMathDelimiter display contains=@NoSpell contained + \ '\\\%(brace\%(vert\)\=\|brack\|cases\|choose\|[lr]\%(angle\|brace\|brack\|ceil\|floor\|group\)\|over\%(brace\|\%(left\|right\)arrow\)\|underbrace\)\>' +syn match plaintexMathFontsCommand display contains=@NoSpell contained + \ '\\\%(\%(bf\|it\|sl\|tt\)fam\|cal\|mit\)\>' +syn match plaintexMathLetter display contains=@NoSpell contained + \ '\\\%(aleph\|alpha\|beta\|chi\|[dD]elta\|ell\|epsilon\|eta\|[gG]amma\|[ij]math\|iota\|kappa\|[lL]ambda\|[mn]u\|[oO]mega\|[pP][hs]\=i\|rho\|[sS]igma\|tau\|[tT]heta\|[uU]psilon\|var\%(epsilon\|ph\=i\|rho\|sigma\|theta\)\|[xX]i\|zeta\)\>' +syn match plaintexMathSymbol display contains=@NoSpell contained + \ '\\\%(angle\|backslash\|bot\|clubsuit\|emptyset\|epsilon\|exists\|flat\|forall\|hbar\|heartsuit\|Im\|infty\|int\|lnot\|nabla\|natural\|neg\|pmod\|prime\|Re\|sharp\|smallint\|spadesuit\|surd\|top\|triangle\%(left\|right\)\=\|vdash\|wp\)\>' +syn match plaintexMathFunction display contains=@NoSpell contained + \ '\\\%(arc\%(cos\|sin\|tan\)\|arg\|\%(cos\|sin\|tan\)h\=\|coth\=\|csc\|de[gt]\|dim\|exp\|gcd\|hom\|inf\|ker\|lo\=g\|lim\%(inf\|sup\)\=\|ln\|max\|min\|Pr\|sec\|sup\)\>' +syn match plaintexMathOperator display contains=@NoSpell contained + \ '\\\%(amalg\|ast\|big\%(c[au]p\|circ\|o\%(dot\|plus\|times\|sqcup\)\|triangle\%(down\|up\)\|uplus\|vee\|wedge\|bmod\|bullet\)\|c[au]p\|cdot[ps]\=\|circ\|coprod\|d\=dagger\|diamond\%(suit\)\=\|div\|land\|lor\|mp\|o\%(dot\|int\|minus\|plus\|slash\|times\)pm\|prod\|setminus\|sqc[au]p\|sqsu[bp]seteq\|star\|su[bp]set\%(eq\)\=\|sum\|times\|uplus\|vee\|wedge\|wr\)\>' +syn match plaintexMathPunctuation display contains=@NoSpell contained + \ '\\\%(colon\)\>' +syn match plaintexMathRelation display contains=@NoSpell contained + \ '\\\%(approx\|asymp\|bowtie\|buildrel\|cong\|dashv\|doteq\|[dD]ownarrow\|equiv\|frown\|geq\=\|gets\|gg\|hook\%(left\|right\)arrow\|iff\|in\|leq\=\|[lL]eftarrow\|\%(left\|right\)harpoon\%(down\|up\)\|[lL]eftrightarrow\|ll\|[lL]ongleftrightarrow\|longmapsto\|[lL]ongrightarrow\|mapsto\|mid\|models\|[ns][ew]arrow\|neq\=\|ni\|not\%(in\)\=\|owns\|parallel\|perp\|prec\%(eq\)\=\|propto\|[rR]ightarrow\|rightleftharpoons\|sim\%(eq\)\=\|smile\|succ\%(eq\)\=\|to\|[uU]parrow\|[uU]pdownarrow\|[vV]ert\)\>' + +syn match plaintexParameterDimen display contains=@NoSpell + \ '\\maxdimen\>' +syn match plaintexMathParameterDimen display contains=@NoSpell + \ '\\jot\>' +syn match plaintexParagraphParameterGlue display contains=@NoSpell + \ '\\\%(\%(big\|med\|small\)skipamount\|normalbaselineskip\|normallineskip\%(limit\)\=\)\>' + +syn match plaintexFontParameterInteger display contains=@NoSpell + \ '\\magstep\%(half\)\=\>' +syn match plaintexJobParameterInteger display contains=@NoSpell + \ '\\magnification\>' +syn match plaintexPageParameterInteger display contains=@NoSpell + \ '\\pageno\>' + +syn match plaintexPageParameterToken display contains=@NoSpell + \ '\\\%(foot\|head\)line\>' + +hi def link plaintexOperator Operator + +hi def link plaintexDelimiter Delimiter + +hi def link plaintexControlSequence Identifier +hi def link plaintexComment Comment +hi def link plaintexInclude Include +hi def link plaintexRepeat Repeat + +hi def link plaintexCommand coretexCommand +hi def link plaintexBoxCommand plaintexCommand +hi def link plaintexCharacterCommand coretexCharacterCommand +hi def link plaintexDebuggingCommand coretexDebuggingCommand +hi def link plaintexFontsCommand coretexFontsCommand +hi def link plaintexGlueCommand plaintexCommand +hi def link plaintexInsertsCommand plaintexCommand +hi def link plaintexJobCommand coretexJobCommand +hi def link plaintexKernCommand plaintexCommand +hi def link plaintexMacroCommand coretexMacroCommand +hi def link plaintexPageCommand plaintexCommand +hi def link plaintexParagraphCommand plaintexCommand +hi def link plaintexPenaltiesCommand plaintexCommand +hi def link plaintexRegistersCommand plaintexCommand +hi def link plaintexTablesCommand plaintexCommand + +hi def link plaintexMath String +hi def link plaintexMathCommand plaintexCommand +hi def link plaintexMathBoxCommand plaintexBoxCommand +hi def link plaintexMathCharacterCommand plaintexCharacterCommand +hi def link plaintexMathDelimiter plaintexDelimiter +hi def link plaintexMathFontsCommand plaintexFontsCommand +hi def link plaintexMathLetter plaintexMathCharacterCommand +hi def link plaintexMathSymbol plaintexMathLetter +hi def link plaintexMathFunction Function +hi def link plaintexMathOperator plaintexOperator +hi def link plaintexMathPunctuation plaintexCharacterCommand +hi def link plaintexMathRelation plaintexOperator + +hi def link plaintexParameterDimen coretexParameterDimen +hi def link plaintexMathParameterDimen coretexMathParameterDimen +hi def link plaintexParagraphParameterGlue coretexParagraphParameterGlue +hi def link plaintexFontParameterInteger coretexFontParameterInteger +hi def link plaintexJobParameterInteger coretexJobParameterInteger +hi def link plaintexPageParameterInteger coretexPageParameterInteger +hi def link plaintexPageParameterToken coretexParameterToken + +let b:current_syntax = "plaintex" + +let &cpo = s:cpo_save +unlet s:cpo_save + |