syntax highlighting - Vim: customize tex equation highlight -


how force vim highlight following environment:

\begin{dmath*}   2 + 2 \end{dmath*} 

the same way

\begin{equation*}  2 + 2 \end{equation*} 

?

i.e want dmath environments (in plain , starred versions) highlighted same ways equation (plain , starred) environment.

enter image description here

i pasted question vim, :setf tex, , used syntaxattr.vim - show syntax highlighting attributes of character under cursor plugin find out corresponding syntax group name texmathzonees.

then opened $vimruntime/syntax/tex.vim , searched it. didn't find directly, this:

call texnewmathzone("e","equation",1) 

then looked :help ft-tex-syntax (completed command-line via <c-d>), , found under :help tex-math nice documentation. that, created following solution:

call texnewmathzone("m","dmath",1) 

you can put ~/.vim/after/syntax/tex.vim, suggested, make permanent. easy, isn't it?!


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -