Reputation: 62538
Yes, that title is the best I could come up with :-)
I have a text, and when activating spellchecking naturally a lot of words come out highlighted. Like emails, adresses, names and so on. How to tell Vim that some word is okey, without adding it to the wordlist.
Meaning, just, while editing this document I don't want to see my name highlighted.
Upvotes: 1
Views: 153
Reputation: 34628
I have my Vim config in a git repository, which is useful for several things; For example, you could alias your vim
to a small script that invokes Vim normally, but after Vim finishes checks if the ~/.vim/spell
directory has any modifications and if so, asks you if you want to keep or discard them. If you want to keep them, it could automatically commit everything in spell
and otherwise reset everything in there. So you usually wont be bothered by that script unless you actually do use the spellchecker.
The only drawback would be that you couldn't both make persistent and volatile additions to the dictionary in one session.
Upvotes: 0
Reputation: 344
From http://vimdoc.sourceforge.net/htmldoc/spell.html
zg Add word under the cursor as a good word to the first name in 'spellfile'. A count may precede the command to indicate the entry in 'spellfile' to be used. A count of two uses the second entry.
In Visual mode the selected characters are added as a
word (including white space!).
When the cursor is on text that is marked as badly
spelled then the marked text is used.
Otherwise the word under the cursor, separated by
non-word characters, is used.
If the word is explicitly marked as bad word in
another spell file the result is unpredictable.
Upvotes: 0