How to spellcheck in Vim

Vim has built-in ability to perform spellcheck. The VimCasts video on spellcheck gives a good summary of these features.

  • Use the set spelllang option to set the language to be used for spellcheck. For example, to set International English, add this to your vimrc:
set spelllang=en
  • To perform a spellcheck use :set spell. The wrongly spelled words are marked in Vim.

  • ]s to jump to next misspelled word.

  • z= to see suggestions for misspelled word under cursor.

  • zg to add misspelled word under cursor to your personal spellfile. Remember it as adding a good word.

  • zG to ignore the misspelled word under cursor for this session.

  • zw to mark correctly spelled word under cursor as a misspelling. Remember it as adding a wrong word.

The spellfile can be found in ~/.vim/spell/. For example, mine is named en.utf-8.add

Tried with: Vim 7.4 and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.