I want to switch between the "Sent" mailbox and the current mailbox. I use the maildir type.

Ideally, there would be a macro bound to a shortcut key that does this.


You can write a macro and bind it to a key, or key sequence. For example, in my muttrc I include this line:

macro index \Cs  "<change-folder> =JWR/INBOX.Sent<enter>"  "go to Sent Items"

It takes me to my Sent items with Ctrls.

You can determine the correct name of the relevant maildir folder by bringing up the prompt with c and then hitting ? for the list.

  • If you want to bind it to a Function key, you'll need to use <F4> - also, are you sure that is the correct path as mutt sees it?
    – jasonwryan
    Jun 26 '12 at 0:19
  • yes, I can do mutt -f /home/XX/Mail/.Sent, and that works
    – daisy
    Jun 26 '12 at 0:21
  • No: follow the advice I provided in my answer and source the correct path from mutt's prompt...
    – jasonwryan
    Jun 26 '12 at 0:22
  • 1
    That worked, just one thing, is it possible to "toggle" between the two mailboxes ?
    – daisy
    Jun 26 '12 at 0:30
  • 1
    There is a <toggle-mailboxes> call but I haven't played around with it: so I'm not sure.
    – jasonwryan
    Jun 26 '12 at 0:34

mutt sidebar sample screenshot

The arch wiki has a good section on enabling and using the TUI sidebar. You can either set it visible all the time:

set sidebar_visible = yes

Or bind sidebar-toggle-visible to a key. sidebar-prev and sidebar-next are used to switch the folder selection, and sidebar-open opens the selected folder.


On my system, I wanted to go back to the INBOX and had to use the following, Otherwise if I did C? and went to another folder, I couldn't get back to the inbox.

macro index <home>  "<change-folder> =INBOX"<enter>

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.