How to Use Vim's Spellchecker


Vim 7 has built in spellchecking. There are two easy ways to turn on spellchecking. If you are using Gvim, you can use Tools > Spelling > Spellcheck On:


If you are using Vim in the terminal, or prefer to type, you can turn on spellchecking in Vim with the command :set spell and turn off spellchecking with :set nospell.

Mispelled words will then be underlined in red in Gvim:


Or highlighted in using Vim in the terminal:


Here are the commands you need to know:

  • ]s — move to the next mispelled word
  • [s — move to the previous mispelled word
  • zg — add a word to the dictionary
  • zug — undo the addition of a word to the dictionary
  • z= — view spelling suggestions for a mispelled word

Here is the Vim spellchecker offering suggestions for the word Nihon:


That is Vim spell checking in a nutshell. For more commands and documentation, just type :help spell into Vim or read the Vim spell docs online.


LOL! I just added your


I just added your command descriptions as comments in my vimrc file.

You misspelled "mispelled".


Thanks for the tip, works like a charm!

Webmaster Tips's picture


I guess I wrote the tutorial so quickly I forgot to spellcheck it. :)

Syndicate content