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

Re: A curiosity with vimrc_example.vim, html, and spell

Expand Messages
  • Dave Roberts
    ... OK, I see that but why then does this happen: Create test.htm containing the single line: Thiss is bolld and this is noot (or add the head/body
    Message 1 of 3 , Jul 5, 2005
      Bram Moolenaar wrote:

      >Dave Roberts wrote:
      >
      >
      >
      >>Latest VIM7 (WinXP):
      >>
      >>File containing only:
      >><html>
      >><body bgcolor=#FFB290>
      >></body>
      >></html>
      >>
      >>.vimrc containing only:
      >>runtime vimrc_example.vim
      >>
      >>Name the file TEST.TXT and run:
      >>setl spell spelllang=en
      >>
      >>Spell checking works (assuming of course that you have the English spell
      >>files)
      >>
      >>Name the file TEST.HTM or TEST.HTML and run the same command
      >>
      >>Spell checking doesn't work.
      >>
      >>I don't think the contents of the file matter, that's just what I used.
      >>
      >>
      >
      >The HTML syntax file defines regions where spell checking is done. It
      >excludes the HTML tags, for good reasons. But the @Spell cluster isn't
      >used properly, the text at the top level isn't spell checked. It does
      >work if you put something in <b> badword </b>.
      >
      >Try removing the "@Spell" items from runtime/syntax/html.vim. Now to
      >many things are spell-checked, thus @NoSpell should be added for these
      >items.
      >
      >

      OK, I see that but why then does this happen:

      Create test.htm containing the single line:
      Thiss is <b>bolld</b> and this is noot
      (or add the head/body begin/end tags as well - doesn't matter)

      Do:
      gvim -u NONE -U NONE test.htm
      :syntax on
      :setl spell spelllang=en

      What you get is 'bolld' is highlighted as black on black (so you can't
      see the letters) and 'Thiss' and 'noot' are ignored.

      It's obviously still something to do with syntax highlightling because
      the same file renamed to test.txt catches all three bad spellings and
      they're all visible.

      >
      >
      >>Also, I renamed my VIMFiles\after, plugin, and ftplugin directories to
      >>make sure it wasn't something in there.
      >>
      >>If I put everything back the way it was (original .vimrc and directory
      >>names correctly spelled) and then comment out the 'runtime
      >>vimrc_example.vim' line then spell checking works in the .HTM(L) file
      >>
      >>
      >
      >That must be because syntax HL is disabled.
      >
      >

      Yep.

      >
      >
      >>but I get the following message on startup:
      >>
      >>Error detected while processing C:\PKG\vim\menu.vim:
      >>line 401:
      >>E329: No menu of that name
      >>
      >>
      >
      >Strange, the menu was defined in the line just above it. I can't
      >reproduce this error.
      >
      >
      >
      Sorry. That one was caused by a file called tagsmenu.vim in my plugin
      directory. Don't know where I got it and never use it so just removed it.

      Thanks,

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