Magit displays the progression of multi-step commands with popup windows. For example, pressing c brings up the commit menu, whence pressing a will invoke magit-commit-amend
.
I would like to include my own command magit-commit-snapshot
, and invoke it with cn.
n: Snapshot
should be displayed in the commit menu, after s: Squash
.
How can I do this? I can see that the bindings exist in magit-key-mode.el
, but I don't see an easy way to add to them from my .emacs
.
transient.el
? Is there a more up-to-date answer? – Trey Oct 30 '19 at 21:07'magit-commit
in this case): enter the magit transient (C-x M-g
), then hitC-x l
, then type the leader key: it will show the prefix command in the minibuffer. E.g. to find the prefix command for"l"
(log):C-x M-g C-x l l
, and you will see:magit-log
. – hraban Apr 19 '21 at 09:53