Hi,

You basically have to unbind q for index (perhaps also pager, depending on what you want) and create the same macro you already have for 'c', for 'q' as well. Then for 'browser' bind 'q' to to 'quit' again.

So basically:

bind index,pager c noop # Unbinding the key first, because the manual says that macros shouldn't be bound to keys that are already bound
bind index,pager q noop # Same as above
macro index,pager c "<change-folder>?<toggle-mailboxes>"
macro index,pager q "<change-folder>?<toggle-mailboxes>"

bind browser q quit

Best Regards,
IFo Hancroft

On 30/08/2021 09:55, Fourhundred Thecat wrote:
Hello,

I have "q" key bound to "quit", and then I have custom macro bound to "c":

   macro   index,pager  c  "<change-folder>?<toggle-mailboxes>"

When I start mutt, I automatically land in "Inbox", and "q" exits.

When I press "c" anywhere in mutt, I get list of my folders, and can go
into them. When inside any of the folder, "q" also exists mutt.

I would like to change the behavior of "q", so that pressing "q" when I
am inside any of the folders, mutt goes back to the list of folders
(same as if I had pressed "c"). And only if I am already in the list of
folders, then "q" exists mutt.

What I want is similar to "q" behavior when in inbox, and composing
message. When I cancel the compose with "q", I don't exit mutt, but
instead land in Inbox again. I would like to keep that behavior.

I guess, I will need to create custom macro for "q" ?
Can anybody suggest how to do it?

thank you,





Reply via email to