Vim and spell checking

I just discovered Vim has spell checking. No more having to manually spell check in mutt with ispell when writing emails, Hurray!!

In your .vimrc file simply add

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 misspelled. The magic incarnations you will need are:

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

Leave a Reply

Your email address will not be published. Required fields are marked *