"some amendments to the standard tex.vim "put in your directory: ~/.vim/after/syntax " author: Brian Fiedler " I wanted gvim to recognize the \be as \begin{equation} and \bea as \begin{equationarray}. " Also, I wanted a cyan background to highlight sections. " syn cluster texMathZones add=texMathZoneZ,texMathZoneZ2 syn region texMathZoneZ matchgroup=Delimiter start="\\be\s*$" matchgroup=Delimiter end="\\ee\s*$" end="%stopzone" keepend contains=@texMathZoneGroup syn region texMathZoneZ2 matchgroup=Delimiter start="\\bea\s*$" matchgroup=Delimiter end="\\eea\s*$" end="%stopzone" keepend contains=@texMathZoneGroup syn sync match texSyncMathZoneZ grouphere texMathZoneZ "\\\be\s*$" syn sync match texSyncMathZoneZ2 grouphere texMathZoneZ2 "\\\bea\s*$" syn sync match texSyncMathZoneZ groupthere NONE "\\\ee\s*$" syn sync match texSyncMathZoneZ2 groupthere NONE "\\\eea\s*$" hi link texMathZoneZ texMath hi link texMathZoneZ2 texMath " highlight begin{section} etc. : highlight texSection ctermfg=Red guifg=Black guibg=Cyan