Created: 2019-10-25Updated: 2019-10-25
Vim Spell-Check
![Enable Vim's built-in spell checker with :set spell spelllang=en_ca, jump between misspellings with ]s and [s, and fix, add, or flag words using z=, zg, zw.](/images/vim.png)
As of Vim7, spell-checking is a built-in feature.
The spell checker will highlight incorrectly spelled words in red.
Light blue highlights indicate words which are only found in another dictionary
(such as "color" from en_us).
Commands
Enable/Disable
Enable spellcheck
setfor all buffers,setlocalfor the current oneen_cawill use Canadian spelling.
:set spell spelllang=en_ca
:setlocal spell spelllang=en_ca
Or if you're not picky, the spelllang argument can be omitted. I'm not sure
what the default is, but I figure it's probable en which uses all the English
dictionaries together.
:set spell
Disable spellcheck:
:set nospell
Using Spell-Check
Move to the next misspelled word
]s
previous misspelled word
[s
Highlight a misspelled word. Show possible replacements. Press return with no input to go back.
z=
Accept the spelling of a word:
zg
Mark a word's spelling as wrong
zw