Skip to content

Instantly share code, notes, and snippets.

@oz oz/macro-reformat
Created Oct 1, 2013

Embed
What would you like to do?
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
You can’t perform that action at this time.