Re: turning on vim spell in xml documents
- On 7/7/06, Eric Smith <to.eric.smith@...> wrote:
> Excuse my too brief question.If you open xml.vim file
> Actually spell is turnned on for xml through my autocmd.
> Probelm is that spelling errors do not show up in tags and only in xml comments.
> I have to chenge filetype to (say) txt in order to see the typos.
and search for Spell, you'll see that it contains several occurences of
According to :help spell-syntax, this is what makes xml syntax
spellcheck only in specific syntax items, but not in others.
I do not find any conditional in xml.vim that let you customize
it. You can try several things:
1) copy $VIMRUNTIME/syntax/xml.vim into your ~/.vim/syntax
and edit it, removing all @Spell things. This will make
spellcheck check everywhere in xml syntax, according to ':help spell-syntax',
2) You can email maintainer of xml.vim asking him to
add some conditional regarding @Spell.
3) You can define some mappings to switch filetype
to txt/empty together with setting spell, and setting
filetype again when setting nospell.
It's all in your hands now!