vimtricks.wiki Concise Vim tricks, one at a time.

How do I navigate between spelling errors and fix them in Vim?

Answer

]s / [s / z=

Explanation

Vim has a built-in spell checker that highlights misspelled words and provides correction suggestions — all without plugins. Once enabled, a small set of commands lets you navigate errors and apply fixes without breaking your editing flow.

How it works

First, enable spell checking:

:set spell spelllang=en_us

Then use these commands:

  • ]s — jump to the next misspelled word
  • [s — jump to the previous misspelled word
  • z= — open a numbered list of correction suggestions for the word under the cursor
  • zg — mark the word as good (adds it to your personal dictionary)
  • zw — mark the word as wrong (flags a word you want highlighted even if correct)

Example

With a document containing the word teh on line 5:

  1. :set spell spelllang=en_us to enable spell highlighting
  2. Press ]s to jump to teh
  3. Press z= to open the suggestion menu
  4. Press 1 then <Enter> to accept the

Tips

  • 1z= applies the top suggestion instantly without showing the full menu
  • Add to .vimrc to always enable: set spell spelllang=en_us
  • :set spellfile=~/.vim/spell/en.utf-8.add persists custom dictionary words across sessions
  • :set nospell disables spell checking for the current buffer

Next

How do I run text I've yanked or typed as a Vim macro without recording it first?