This option controls which set of Magit key bindings, if any, may be added to the global keymap, even before Magit is first used in the current Emacs session.
nil
, no bindings are added.
default
, maybe add:
C-x g | magit-status |
C-x M-g | magit-dispatch |
C-c M-g | magit-file-dispatch |
recommended
, maybe add:
C-x g | magit-status |
C-c g | magit-dispatch |
C-c f | magit-file-dispatch |
These bindings are strongly recommended, but we cannot use
them by default, because the C-c <LETTER>
namespace is
strictly reserved for bindings added by the user (see
(elisp)Key Binding Conventions).
The bindings in the chosen set may be added when
after-init-hook
is run. Each binding is added if, and only
if, at that time no other key is bound to the same command,
and no other command is bound to the same key. In other words
we try to avoid adding bindings that are unnecessary, as well
as bindings that conflict with other bindings.
Adding these bindings is delayed until after-init-hook
is
run to allow users to set the variable anywhere in their init
file (without having to make sure to do so before magit
is
loaded or autoloaded) and to increase the likelihood that all
the potentially conflicting user bindings have already been
added.
To set this variable use either setq
or the Custom interface.
Do not use the function customize-set-variable
because doing
that would cause Magit to be loaded immediately, when that form
is evaluated (this differs from custom-set-variables
, which
doesn’t load the libraries that define the customized variables).
Setting this variable has no effect if after-init-hook
has
already been run.