home of the madduck/ code/ mailplate/
mutt editor

I use mailplate as my $editor for mutt, with the following setting in my ~/.mutt/muttrc:

set editor="~/.bin/mail/mailplate --edit --auto --keep-unknown"

mailplate currently has a bit of a limitation, or at least I have not figured out a way how to work around it sensibly yet. If you re-edit a message from mutt's compose menu, it causes mailplate to reprocess the message, which you may not want.

Similarly, if you find yourself editing messages from the index or pager, you probably also don't want mailplate to get in the way. For these cases, I currently use the following two keybindings:

macro compose     e ':set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit-headers>:set editor="$my_editor"<enter>' "invoke normal editor to edit message"
macro index,pager e ':set my_editor="$editor"<enter>:set editor=sensible-editor<enter><edit>:set editor="$my_editor"<enter>' "invoke normal editor to edit message"