I use Vim Spell to check many LaTeX files, which get identified as
ft=plaintex
. They are mostly regular text words, without markup syntax. In many cases I have entire paragraphs without syntax. Occasionally I do have markup, like \dosomething
Vim Spell skips checking my special commands, like \dosomething
exactly as desired... except inside comments. I don't want \dosomething
checked there either.
If I find a paragraph I don't like, I comment the paragraph out with a **%** percent sign. However, if I do that, then my markup syntax gets flagged as spelled wrong. \dosomething
then gets flagged as bad spelling "dosomething" spelled wrong. I want Vim Spell to skip over \dosomething
even if it's within a commented out paragraph. I could zg
the word in normal mode while using :set spell
but I'd rather Spell just skip my LaTeX syntax automatically, both in comments and outside of comments.
Is there a way I can tell Vim to skip flagging syntax words inside of my comments? Another similar question explains that Vim will check the comments for misspelled words. I know that. I want to turn it off.
Asked by user12711
(185 rep)
Jan 29, 2022, 05:15 PM
Last activity: Dec 18, 2023, 07:13 PM
Last activity: Dec 18, 2023, 07:13 PM