the word to the internal word list
|internal-wordlist|.
zuw *zug* *zuw*
zug Undo |zw| and |zg|, remove the word from the entry in
'spellfile'. Count used as with |zg|.
zuW *zuG* *zuW*
zuG Undo |zW| and |zG|, remove the word from the internal
word list. Count used as with |zg|.
*:spe* *:spellgood* *E1280*
:[count]spe[llgood] {word}
Add {word} as a good word to 'spellfile', like with
|zg|. Without count the first name is used, with a
count of two the second entry, etc.
:spe[llgood]! {word} Add {word} as a good word to the internal word list,
like with |zG|.
*:spellw* *:spellwrong*
:[count]spellw[rong] {word}
Add {word} as a wrong (bad) word to 'spellfile', as
with |zw|. Without count the first name is used, with
a count of two the second entry, etc.
:spellw[rong]! {word} Add {word} as a wrong (bad) word to the internal word
list, like with |zW|.
*:spellra* *:spellrare*
:[count]spellra[re] {word}
Add {word} as a rare word to 'spellfile', similar to
|zw|. Without count the first name is used, with
a count of two the second entry, etc.
There are no normal mode commands to mark words as
rare as this is a fairly uncommon command and all
intuitive commands for this are already taken. If you
want you can add mappings with e.g.: >
nnoremap z? :exe ':spellrare ' .. expand('<cWORD>')<CR>
nnoremap z/ :exe ':spellrare! ' .. expand('<cWORD>')<CR>
< |:spellundo|, |zuw|, or |zuW| can be used to undo this.
:spellra[re]! {word} Add {word} as a rare word to the internal word
list, similar to |zW|.
:[count]spellu[ndo] {word} *:spellu* *:spellundo*
Like |zuw|. [count] used as with |:spellgood|.
:spellu[ndo]! {word} Like |zuW|. [count] used as with |:spellgood|.
After adding a word to 'spellfile' with the above commands its associated
".spl" file will automatically be updated and reloaded. If you change
'spellfile' manually you need to use the |:mkspell| command. This sequence of
commands mostly works well: >
:edit <file in 'spellfile'>
< (make changes to the spell file) >
:mkspell! %
More details about the 'spellfile' format below |spell-wordlist-format|.
*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.
Finding suggestions for bad words:
*z=*
z= For the word under/after the cursor suggest correctly
spelled words. This also works to find alternatives
for a word that is not highlighted as a bad word,
e.g., when the word after it is bad.
In Visual mode the highlighted text is taken as the
word to be replaced.
The results are sorted on similarity to the word being
replaced.
This may take a long time. Hit CTRL-C when you get
bored.
If the command is used without a count the
alternatives are listed and you can enter the number
of your choice or press <Enter> if you don't want to
replace. You can also use the mouse to click on your
choice (only works if the mouse can be used in Normal
mode and when there are no line wraps). Click on the
first line (the header) to cancel.
The suggestions listed normally replace a highlighted
bad word. Sometimes they include other text, in that
case the replaced text is also listed after a "<".
If a count is used that suggestion is used, without
prompting. For example, "1z=" always takes the first
suggestion.
If 'verbose' is non-zero a score will be displayed
with the suggestions to indicate the likeliness to the
badly spelled word (the higher the score the more
different).
When a word was replaced the redo command "." will
repeat the word replacement. This works like "ciw",
the good word and <Esc>. This does NOT work for Thai
and other languages without spaces between words.
*:spellr* *:spellrepall* *E752* *E753*
:spellr[epall] Repeat the