Monday, April 23, 2012

Re: Spell check the filters troff/nroff commands?

On Sun, Apr 22, 2012 at 1:51 AM, howard Schwartz <howardb21@gmail.com> wrote:
> I did find an nroff.vim syntax file, and when I source it, it does highligh
> a lot of those commands. But this does not seem to effect spell. When I set
> spell, it highlights the nroff commands, even though they are covered b the
> syntax file.
>
> How to you tell the spell checker to exclude strings that a syntax file
> targets?
>
>

It looks like the nroff.vim syntax file predates the integrated spell
checker, or the author has decided not to integrate it with spell
checking for some reason. For now, you can copy nroff.vim to
~/.vim/syntax/nroff.vim on Unix-like systems or
$HOME/vimfiles/syntax/nroff.vim on Windows, then edit it to add
"contains=@NoSpell" to all syntax definitions (if a definition already
has a contains= list, add @NoSpell to the list).

You may also need to add a "syntax spell toplevel" somewhere after the
"syntax clear" command to get spell checking on areas which are NOT
matched by syntax items.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment