Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@oz
Created October 1, 2013 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oz/6781258 to your computer and use it in GitHub Desktop.
Save oz/6781258 to your computer and use it in GitHub Desktop.
A mutt macro to reformat e-mail message bodies. This is especially useful when you receive e-mails with very long lines of text, and you'd rather read a neatly formatted text. Simply press `Esc-f` to toggle between original message body, and reformatted with `par`.
# Add a macro on Esc-f to toggle message body filtering with par (reformat).
macro pager ,@fmton \
"<enter-command>set display_filter=/usr/bin/par<enter> \
<enter-command>macro pager \\ef ,@fmtoff 'Unformat message body'<enter> \
<exit><display-message><enter>" \
"Unformat message body"
macro pager ,@fmtoff \
"<enter-command>unset display_filter<enter> \
<enter-command>macro pager \\ef ,@fmton 'Reformat message body'<enter> \
<exit><display-message><enter>" \
"Reformat message body"
macro pager \ef ,@fmton 'Reformat message body'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment