Saturday, April 21, 2012

Re: Spell check the filters troff/nroff commands?

On Saturday, April 21, 2012 9:49:50 AM UTC-5, howardb21 wrote:
> It happens that I still use the original Unix markup language, troff with
> commands that start with a dot on at the beginning of a line, or ocmes that
> start with a backslash, e.g., .ce for center or \fB for font bold.
>
> Being new at the spell checker, how can I arrange for the spell cheker to skip
> these troff commands and not report them as misspelled words? There are
> hundreds of such commands, which include arguments .e.g, .in 4n or .sp 5v.
>
> Aspell used to filter out such commands withe hte -n option, but at least for
> the PC aspell now only includes filters for LaTex, html, etc.
>

Vim's spell checker integrates with syntax highlighting so that the syntax can define what regions spell checking applies to.

You could find or create a syntax file to highlight and/or exclude from the spell checker all the macros and commands. First try setting filetype to nroff to see if it does what you need, since there is an nroff syntax file distributed with Vim; but I have no idea whether it will do what you want.

Alternatively, you could add all the macros and commands to your dictionary as "good" words with the zg command; but I think this is a less ideal solution.

--
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