Spell Checking in Vim

The feeling I get when someone points to a typo in my PR:


To avoid this from happening I added spell checking to the editor I use to write code, and practically everything else - Vim.

Getting Started

Add the following to your .vimrc:

set spell spelllang=en_us


All commands refer to the word under the cursor

  • z= - see suggestions for misspelled word

  • zg - add word to your personal “good words” in the spellfile

  • zG - ignore the misspelled word for this session (not stored and lost when you exit Vim)

  • ]s/[s - jump to next/previous misspelled word. A good practice is to go over them before publishing your changes.

  • zw - mark word as misspelled

The full docs are here


Add the following to your .vimrc to get word completion:

set complete+=kspell

Just press CTRL-N or CTRL-P in insert-mode while typing.

comments powered by Disqus