Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore one "misspelling" in Vim

Is there a way to tell Vim not to highlight a word once? For example, in "the password is abc123", I don't want to add abc123 to the wordlist, but still wouldn't like the big red rectangle around it.

Clarification: I'm looking for a command that makes the spell checker ignore the current word (or last misspelling).

like image 731
Tim Avatar asked Sep 02 '25 18:09

Tim


1 Answers

Without having the word stored somewhere, it's hard (not to say impossible) to ignore it always.

But, if you are looking to ignore the word really once, that is only for a moment, you can add it to the internal list with the zG command.

                                                             *zG*
zG              Like "zg" but add the word to the internal word list
                |internal-wordlist|.


                                               *internal-wordlist*
The internal word list is used for all buffers where 'spell' is set.  It is
not stored, it is lost when you exit Vim.  It is also cleared when 'encoding'
is set.
like image 193
sidyll Avatar answered Sep 04 '25 09:09

sidyll