Spell Checking
Built-in spell checker with per-language dictionaries.
Vim ships with a real spell checker. Toggle it with :set spell, jump misspellings with [s/]s, suggest fixes with z=, add words to a personal dictionary with zg.
Vim has a real spell checker built in โ not an after-thought, not a plugin. Turn it on with :set spell, and misspelled words get a wavy underline (or whatever your 'spell' highlight defines).
Toggle and language
| Command | Effect |
|---|---|
| :set spell | Turn spell checking on for the current buffer |
| :set nospell | Turn it off |
| :setlocal spell! | Toggle, only for this buffer |
| :set spelllang=en_us | Use the US English dictionary |
| :set spelllang=en_us,de_de | Spell check against multiple languages at once |
Move between misspellings
| Key | Note |
|---|---|
| ]s | Jump to the next misspelled word |
| [s | Jump to the previous misspelled word |
| ]S | Same as ]s but only flag bad words (skip rare/regional) |
| [S | Same as [s but only flag bad words |
Fix and learn
| Key | Note |
|---|---|
| z= | Show suggestions for the word under cursor (numbered list, type a digit + Enter) |
| zg | Good word โ add to your personal dictionary (file at 'spellfile') |
| zw | Wrong word โ mark as misspelled in your personal dictionary |
| zug | Undo a previous zg |
| zuw | Undo a previous zw |
See also: The {key:z} Family, The {key:[} and {key:]} Family