Spell check in vim7 / mutt

Perhaps this is widespread knowledge but I didn’t know about it, and in the short time since dg pointed it out to me I have been loving it, so I thought I’d mention it here.

A few days ago I made stupid typos twice in a row in emails of a professional nature that I really shouldn’t be making typos in. It’s easy to say that I should be spending an extra couple of minutes to proofread, but it’s also easy to forget to do that. I commented on IRC that perhaps it was time for me to sort out spell checking in mutt and / or vim. Straight away dg said:

<dg> grifferz: just use vim 7 and:
     au BufNewFile,BufRead /tmp/mutt* set ai et tw=70 spell
<dg> or something
<grifferz> dg: I have vim7!  and this appears to work.
           thanks for the tip
<dg> vim's spelling support is pretty nice

vim 7 is standard in Debian Etch so really not all that new. And yes, it really is very nice. Here’s what I added to .vimrc:

set spelllang=en_gb
set spellfile=~/.vim/spell.en.utf-8.add

au BufNewFile,BufRead /tmp/mutt*  setf mail
au BufNewFile,BufRead /tmp/mutt*  set ai et tw=68 spell

Words that it thinks are misspelled are highlighted in red. z= when over the word to bring up a list of suggestions. zg to permanently add the word to the spellfile.