VIM spell checker

From http://inodes.org/blog/2008/02/08/vim-and-spell-checking/

Add to your .vimrc

setlocal spell spelllang=en_au

Note: By default vim only installs en_us spell files. If you are running debian then there is a vim-spellfiles package. There is an ubuntu bug to do something about this as well. Since I’m using ubuntu I simply grabbed the en directory from ftp://ftp.vim.org/pub/vim/runtime/spell/ and dumped it in /usr/share/vim/vim71/spell

Vim will now highlight words it thinks are misspelt. The magic incarnations you will need are:

  • z= - Suggest alternatives for the word
  • zg - Add word to dictionary
  • zw - Remove word from dictionary