vim spell checking - comments only in LaTeX files
The latex ft plugin conveniently defines this behaviour.
SpellChecker : Spell check text including LaTeX documents
Using latexmk, vim spell checking and vim latex-suite
There is an option that appears to come close:
:syntax spell [toplevel | notoplevel | default]
Update
Also
:he ft-tex-syntax
has very useful tidbits, like
Don't Want Spell Checking In Comments? ~
Some folks like to include things like source code in comments and so would
prefer that spell checking be disabled in comments in LaTeX files. To do
this, put the following in your <.vimrc>: >
let g:tex_comment_nospell= 1
You'll have to figure out whether you can use that/extrapolate from there
I had the same problem (VIM 7.3), but this post at the vim-latex-devel mailing list provided the clue. To get the spell checking working, I had to put
syntax spell toplevel
in my ~/.vimrc
, but it has to be declared after
syntax enable
or
syntax on
for it to work.