I have the following definitions in a .tex file preamble:
\newcommand{\beq}{\begin{eqnarray}}
\newcommand{\eeq}{\end{eqnarray}}
If I then use \beq
and \eeq
to define an equation array region, spell checking is turned on in this region, where it would not be if I had used \begin{eqnarray}
and \end{eqnarray}
. I tried to turn off spell-checking in these custom regions using the method presented here, i.e. copy the $VIMRUNTIME/syntax/tex.vim
file to ~/.vim/syntax
and edit the file. I added a line like
syn region texZone start="\\beq" end="\\eeq\|%stopzone\>" contains=@NoSpell
to the file, but it didn't work, and spellchecking is not disabled between \beq
and \eeq
tags. I am very unfamiliar with Vim syntax files, so I don't know how to debug this or take further steps. Any thoughts on how to turn off spell check just in my custom region would be appreciated.
eqnarray
environment alltogether, instead use thealign
environment.