Loading ...
Sorry, an error occurred while loading the content.

Re: turning on vim spell in xml documents

Expand Messages
  • Yakov Lerner
    ... If you open xml.vim file ... and search for Spell, you ll see that it contains several occurences of contains=.....@Spell... According to :help
    Message 1 of 4 , Jul 7, 2006
    • 0 Attachment
      On 7/7/06, Eric Smith <to.eric.smith@...> wrote:
      > Excuse my too brief question.
      >
      > 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.

      If you open xml.vim file
      :e $VIMRUNTIME/syntax/xml.vim
      and search for Spell, you'll see that it contains several occurences of
      contains=.....@Spell...
      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!

      Yakov
    Your message has been successfully submitted and would be delivered to recipients shortly.