" Vim syntax file
" Language: TeX
" Maintainer: Charles E. Campbell <NdrchipO@ScampbellPfamily.AbizM>
" Last Change: Apr 02, 2015
" Version: 84
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_TEX
"
" Notes: {{{1
"
" 1. If you have a \begin{verbatim} that appears to overrun its boundaries,
" use %stopzone.
"
" 2. Run-on equations ($..$ and $$..$$, particularly) can also be stopped
" by suitable use of %stopzone.
"
" 3. If you have a slow computer, you may wish to modify
"
" syn sync maxlines=200
" syn sync minlines=50
"
" to values that are more to your liking.
"
" 4. There is no match-syncing for $...$ and $$...$$; hence large
" equation blocks constructed that way may exhibit syncing problems.
" (there's no difference between begin/end patterns)
"
" 5. If you have the variable "g:tex_no_error" defined then none of the
" lexical error-checking will be done.
"
" ie. let g:tex_no_error=1
"
" 6. Please see :help latex-syntax for information on
" syntax folding :help tex-folding
" spell checking :help tex-nospell
" commands and mathzones :help tex-runon
" new command highlighting :help tex-morecommands
" error highlighting :help tex-error
" new math groups :help tex-math
" new styles :help tex-style
" using conceal mode :help tex-conceal
" Version Clears: {{{1
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let s:keepcpo= &cpo
set cpo&vim
scriptencoding utf-8
" Define the default highlighting. {{{1
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_tex_syntax_inits")
let did_tex_syntax_inits = 1
if version < 508
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
endif
if exists("g:tex_no_error") && g:tex_no_error
let s:tex_no_error= 1
else
let s:tex_no_error= 0
endif
" by default, enable all region-based highlighting
let s:tex_fast= "bcmMprsSvV"
if exists("g:tex_fast")
if type(g:tex_fast) != 1
" g:tex_fast exists and is not a string, so
" turn off all optional region-based highighting
let s:tex_fast= ""
else
let s:tex_fast= g:tex_fast
endif
else
let s:tex_fast= "bcmMprsSvV"
endif
" let user determine which classes of concealment will be supported
" a=accents/ligatures d=delimiters m=math symbols g=Greek s=superscripts/subscripts
if !exists("g:tex_conceal")
let s:tex_conceal= 'abdmgsS'
else
let s:tex_conceal= g:tex_conceal
endif
if !exists("g:tex_superscripts")
let g:tex_superscripts= "[0-9a-zA-W.,:;+-<>/()=]"
endif
if !exists("g:tex_subscripts")
let g:tex_subscripts= "[0-9aehijklmnoprstuvx,+-/().]"
endif
" Determine whether or not to use "*.sty" mode {{{1
" The user may override the normal determination by setting
" g:tex_stylish to 1 (for "*.sty" mode)
" or to 0 else (normal "*.tex" mode)
" or on a buffer-by-buffer basis with b:tex_stylish
let s:extfname=expand("%:e")
if exists("g:tex_stylish")
let b:tex_stylish= g:tex_stylish
elseif !exists("b:tex_stylish")
if s:extfname == "sty" || s:extfname == "cls" || s:extfname == "clo" || s:extfname == "dtx" || s:extfname == "ltx"
let b:tex_stylish= 1
else
let b:tex_stylish= 0
endif
endif
" handle folding {{{1
if !exists("g:tex_fold_enabled")
let g:tex_fold_enabled= 0
elseif g:tex_fold_enabled && !has("folding")
let g:tex_fold_enabled= 0
echomsg "Ignoring g:tex_fold_enabled="<