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. You may need to read a guide for message editing and quoting or A Beginner's Guide to Effective Email.

Mutt uses an external editor if it can, this is most likely to be the traditional unix vi editor. Mutt looks to see whether you have an editor configuration setting, if not then it uses your $EDITOR environmental variable. If neither of these is set, then mutt uses the built-in line-oriented text editor.

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

echo $EDITOR

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

If you need more, try working through a longer online Vim tutorial. 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.

Other editors

There are other text editors, if you don't know what they are, then you should probably stick with vim.

Spell checking

By default, mutt will use the Ispell spell-checker - if it is installed on your system. This is bound to i in the compose menu that appears after editing/creating your message.

Unfortunately, ispell doesn't distinguish between the stuff that needs to be checked for spelling and stuff that doesn't; Like attribution-lines, quoted text and sig files. Spellutils are a set of tools that can be used to ignore this junk when checking email with ispell and mutt.

An alternative to ispell is to use the more modern Aspell spell-checker. This mutt configuration command will switch your default to aspell, which can correctly identify the different parts of email:

set ispell="aspell -e -c"

You may prefer to check your spelling in your editor rather than your mailer. The following vim macro can be used to check email using aspell. Add it to your ~/.vimrc file and hit the f8 key in vim command mode to check your email text.

:autocmd FileType mail :nmap <F8> :w<CR>:!aspell -e -c %<CR>:e<CR>

Other methods of checking spelling in vim are: Vimspell, a set of macros that integrate ispell into vim, and engspchk which has the advantage of not requiring an external program such as ispell or aspell. With both these tools, misspelled words are highlighted in-place and alternatives are offered - However, neither have the email specific features of aspell or Spellutils.

Document Links

vim text editor
VIM is an improved version of the editor "vi", one of the standard text editors on UNIX systems.
http://www.vim.org/
Vim Tutorial
A vim tutorial based on several IRC logs
http://vi-improved.org/tutorial.html
ICCF charity
Users of the text editor Vim are asked to help ICCF helping children in Kibaale.
http://www.vim.org/iccf/
Message Editing and Quoting
HOWTO Edit Messages - Message Editing and Quoting Guide (with Examples)
http://learn.to/edit_messages
Spellutils
Spellutils is a suite of programs which are used to isolate someSpellutils is a suite of programs which are used to isolate some parts of text and hand them over to another program.
http://home.worldonline.dk/~byrial/spellutils/
Vimspell
This vim macro uses ispell and the syntax highlighting of vim to show misspelled words
http://www.fleiner.com/vim/spell.html
engspchk
uses Vim's highlighting ability to make misspelled (English) words show up as "Error"
http://www.vim.org/scripts/script.php?script_id=195
Ispell spell-checker
International Ispell is an interactive spell-checking program for Unix which supports a large number of EuropeanInternational Ispell is an interactive spell-checking program for Unix which supports a large number of European languages.
http://fmg-www.cs.ucla.edu/geoff/ispell.html
Aspell spell-checker
Aspell is an Open Source spell checker designed to eventually replace Ispell.
http://aspell.net/
A Beginner's Guide to Effective Email
Kaitlin Duck Sherwood wrote this document to try to help people avoid email problems.
http://www.webfoot.com/advice/email.top.html
This document was last modified on 2012-02-28 21:31:15.
Bruno Postle <bruno@postle.net>
Copyright © 2001 Bruno Postle and others. This guide is released under the Free Documentation License. http://www.gnu.org/licenses/fdl.txt