Add the Languages You Want to Spell Check
Yes, with three times the character l.
Toggle the Spell Checker in a File
View Spell Checker Recommendations
Press z= with the cursor on the misspelled word.
Accept the First Recommendation
Press 1z= with the cursor on the misspelled word.
Create a Custom Dictionary
- Create a new text file that contains the words you want to add to the custom dictionary. Each word should be on a separate line.
- Save the file with a
.dicextension. For example, you could save the file asprogramming.dic. - Type
:set spellfile=path/to/custom.dicand press<Enter>(or add it to your.vimrc).
Using Multiple Custom Dictionaries
Add New Words to the Dictionary
Press zg with the cursor on the misspelled word.
Add Words to a Different Dictionary
- Switch to the dictionary you want to add the word to:
:set spelllang=fr - Add the word using
zg. - Switch back to your original dictionary:
:set spelllang=en_us,fr
Add Words to a Specific Dictionary
Use :spell {word} {lang} to add a word to a specific dictionary without changing spelllang.
For example, :spell bonjour fr adds “bonjour” to the French dictionary.
Remove Words from the Dictionary
Press zw with the cursor on the misspelled word.
Customize Spell Checker Appearance
SpellBad: the color for incorrectly spelled words;SpellCap: the color for capitalized words that might be incorrect;SpellRare: the color for rarely used words;SpellLocal: the color for words that are not recognized in the current language but are defined in a custom dictionary.