Text editing

Mutt doesn’t edit text

When you reply-to or start a new email, mutt creates a temporary file, fills it with quoted-text and/or your signature, and opens it in an external text editor for you to compose your message. When you have finished, you save the message and mutt takes it from there.

It is up to you and your editor what the message contains. In particular mutt will not stop you from overquoting, bad-spelling or typing in lines that are just too long.

Mutt uses an external editor if it can. It looks first at its own editor setting, then at your $EDITOR environment variable. If neither is set it falls back to a built-in line editor, which you do not want.

You can check what your default editor is by typing this in your shell:

echo $EDITOR

It is also worth turning this on, which puts the message headers at the top of the file so you can edit To: , Cc: and Subject: in your editor rather than at mutt’s prompts:

set edit_headers = yes

Vim

Vim is an improved clone of the standard vi editor and is installed as standard on many systems. Some reasons for using the vim text editor for email:

If you are unfamiliar with the vi interface used with vim, then there is a handy tutorial that takes you through all the basic commands you will need, type this in your shell to start it:

vimtutor

Vim is “charity-ware”, this means you can use and distribute it freely, but are encouraged to make a donation to the ICCF charity for orphans in Uganda.

A couple of settings in ~/.vimrc make mail work better. Vim recognises mutt’s temporary files as mail filetype automatically:

autocmd FileType mail setlocal spell textwidth=72

If you have set text_flowed in mutt, as suggested in the sending mail section, set textwidth=0 and let the recipient’s mailer do the wrapping instead.

Other editors

Any editor will do. Emacs, neovim, helix and kakoune all work; so does nano, which is a perfectly reasonable choice if you do not already have vi fingers and would rather learn one thing at a time. Set it and move on:

set editor = "nano"

The only real requirements are that the editor blocks until you close the file, and that it does not silently reformat what you type.

Spell checking

Mutt has an <ispell> function bound to i in the compose menu that appears after editing your message. This runs whatever external program the ispell setting names.

The historical default, ispell itself, is long dead. Most distributions now build mutt with hunspell in its place, so this may already work. If not, or if you want better results, use aspell, which understands enough about email to skip attribution lines, quoted text and signatures:

set ispell = "aspell -e -c"

The alternatives are aspell and hunspell; hunspell has the better dictionaries for most languages, aspell has the better email handling. Either is fine.

You may prefer to check spelling in your editor as you type rather than in a separate pass. Vim has had a built-in spell checker since version 7, which needs no external program at all and highlights mistakes in place - the spell setting in the vimrc snippet above turns it on. Press z= on a highlighted word for suggestions, and zg to add a word to your dictionary. See the vim documentation on spelling for the rest. Emacs has flyspell, and most other editors have something equivalent.

Writing mail people can read

Mutt will happily let you send something unreadable. Two habits cover almost everything:

useplaintext.email makes the case for the second and has configuration notes for a lot of mail clients. Kaitlin Duck Sherwood’s Beginner’s Guide to Effective Email is still the friendliest introduction to the rest, and Wikipedia’s article on posting style explains why the mailing list you just joined is annoyed with you.

Last updated 31 August 2026.