Mutt Hide Headers with Shortcut

mutt

I am trying to find a way to define a shortcut in Mutt to show the headers of the email in the Pager view. IMHO the headers use too much space and I want to hide, apart from when I press a specific shortcut. Do you know whether it is possible?

Thank you

Best Answer

What's wrong with the h key in the pager?

That switches between full headers and "weeded" minimal headers. The set of "minimal" headers can be defined in your ~/.muttrc with ignore and unignore commands. e.g. i have the following in my ~/.muttrc:

ignore *
unignore from date subject to cc
unignore x-mailer
unignore x-spam-status
unignore x-spam-report

BTW, h is the default binding for display-toggle-weed:

bind index     h   "display-toggle-weed"
bind pager     h   "display-toggle-weed"
bind attach    h   "display-toggle-weed"
bind compose   h   "display-toggle-weed"

man muttrc and search for weed for more info.

Related Question