mutt/vim Spell Checking E-mail as You Type

jbisbee on 2004-04-02T16:28:00

Casey posted in his journal about forgetting to spell check after composing his e-mail. I broke down a couple months ago and went through the some of the top vim scripts on vim.org to see if I could find a decent spell checker.

Well I found one called vimspell.vim and this is how I implemented it only to auto spell check my e-mail as I type and not any old text document I open up (which got REALLY anoying)

  1. grab vimspell.vim
  2. mkdir ~/.mutt
  3. cp vimspell.vim ~/.mutt/.
  4. vim ~/.mutt/vimrc # should only contain the following 5 lines

    source ~/.vimrc
    source ~/.mutt/vimspell.vim
    highlight SpellErrors ctermfg=Red cterm=underline term=reverse
    set filetype=mail " correct syntax highlighting
    set textwidth=72  " wrap at column 72

  5. In your ~/.muttrc or (in my case ~/.mutt/mutt.settings) tell vim to use the new ~/.mutt/vimrc file:

    set editor = "vim -u ~/.mutt/vimrc"

and presto you should have spell checking as you type.

UPDATE - fixed line wrapping issue with long "highlight..." ~/.mutt/vimrc line


Minor correction

Mr. Muskrat on 2004-04-02T18:06:40

Line 3 of ~/.mutt/vimrc should not have the + in it. The line should be:
highlight SpellErrors ctermfg=Red cterm=underline term=reverse

Re:Minor correction

jbisbee on 2004-04-02T18:42:45

the "+" was to denote that it should have been continued on the previous line. I'm just not proficent in markup to make the darn thing not wrap

a vim/mutt/spellcheck alternative

markjugg on 2004-04-03T02:26:45

I also use vim, mutt and vimspell.vim. Somehow my configuration is much less complicated. First, I have this abbreviation defined, which completely avoids vimspell.vim:
cab aspe :w<CR>:!aspell -e -c  %<CR>:e<CR><CR>
That allows me to type ":aspe" and have the current document checked by 'aspell' as an e-mail message. This is a solution on it's own.

I use 'vimspell.vim' to have spell check as I type. It seems to just check the document 'every once in a while'. However, it doesn't check so frequently that it slows me down, and it doesn't check documents with types that don't make sense to spell check.

I have just these two other lines related to spelling in my in .vimrc:

let spell_executable = "aspell"
let spell_insert_mode = 0

Vimspell.vim, Mutt and Aspell on Debian Unstable

mdb on 2005-04-11T08:12:21

Hi, I've followed the instructions to get on-the-fly spell checking working within Mutt, using Aspell and the vimspell.vim script, but with no luck.

One thing could be that it's been a year since these instructions were posted and a lot has changed since then.

Any ideas if these still apply?

Thanks.