Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim Spell option to ignore source code identifiers containint underscore, numbers, etc

Tags:

vim

Is there any option in vim spell checker to ignore words containing underscore, multiple uppercase letters, minus, numbers in a plain text file. I could not find anything in the manuals (7.2) or Google search.

like image 399
Shelly Adhikari Avatar asked Nov 20 '09 23:11

Shelly Adhikari


People also ask

How do I turn off spell check in Vim?

vim Spell checker Spell Checking To turn on the vim spell checker run :set spell . To turn it off run :set nospell .

How do I use spells in Vim?

Using Spellchecking To move to a misspelled word, use ]s and [s . The ]s command will move the cursor to the next misspelled word, the [s command will move the cursor back through the buffer to previous misspelled words. Just hit Enter if none of the suggestions work, or enter the number for the correct word.


1 Answers

You can use the syntax command with the @NoSpell cluster:

syn match myExCapitalWords +\<\w*[_0-9A-Z-]\w*\>+ contains=@NoSpell
like image 153
rools Avatar answered Oct 12 '22 22:10

rools