To enable spell checking for a syntax group, you'd have to add contains=@Spell
, e.g. for the texStatement
group, that would be:
:syn match texStatement "\\\a\+" contains=@Spell
But with that, you'd still have to add all "good" statements to your spell file. If you just want to highlight certain "bad" words, you can define a contained match:
:syn match texBadStatement "theat" containedin=texStatement
And then link to the error or bad spell highlighting:
:hi link texBadStatement SpellBad
Put those commands into ~/.vim/after/syntax/tex.vim
to make them persistent.
I'm not a Latex specialist. If the texStatement
group is wrong, you need to find out which syntax group causes the highlighting. :syn list
shows all active groups, but it's easier when you install the SyntaxAttr.vim - Show syntax highlighting attributes of character under cursor plugin.