1

After following this post: Saving email as file in mutt?, while in Pager view, pressing v and s in sequence will prompt the user to save the first attachment as a local file. As commented in the solution, there is no header info at all.

How to set up a macro that does the following?

  1. Save the message with header info to a local file;
  2. Use Vim to open such a file.

Also, I tried to pipe the message to Vim, by pressing | vim<enter> in Pager view. It does get the text to Vim, but that Vim session only stayed alive for seconds.

  • you could use e to and set EDITOR environmental variable to vim – mrajner Jun 4 at 13:05
  • @mrajner, thank you! How may I re-assign such action to another key? I tried bind index,pager i edit, but the new "mapping/binding" looks different from the native e's mapping ==> the latter has been mapped to edit read? – llinfeng Jun 5 at 20:59
0

Because you're piping the message to vim you have to tell vim that it should read from /dev/stdout.

Try following:

| vim -<enter>
  • 1
    Piping through vim with the training - marker worked! – llinfeng Jun 8 at 0:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.