-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Keymaps guide
Justin Burkett edited this page Dec 9, 2015
·
6 revisions
-
Overriding keymaps/overlay keymaps
-
Examples:
- magit section maps
- micro states
-
Examples:
-
Emulation mode keymaps
- Non-evil emulation-mode-maps
- Used to elevate minor mode maps
-
Examples:
- bind-map keys (not evil-keys) with override option
- also
bind-key*
puts things here
- Evil Intercept keymaps
- Used to handle ESC in evil
-
Command:
(evil-make-intercept-map map)
- etc.
- Evil Local state keymap
- Used by evil-leader
-
Command:
(define-key evil-normal-state-local-map key def)
-
Maps:
evil-normal-state-local-map
evil-insert-state-local-map
- Example: currently used by bind-map for evil keys with override-mode-maps option (chosen to emulate evil-leader priority)
- Evil Auxiliary keymaps
- Used to elevate minor mode maps
- Used if you define minor-mode and evil-state specific keys (lots of examples)
-
Command:
(evil-define-key state mode-map key def)
- Example: bind-map evil-keys tied to a minor-mode
- Evil Overriding keymaps
- Used to put minor mode maps ahead of evil global maps
-
Command:
(evil-make-overriding-map map)
- Example: Dired-mode-map for example is here
- Evil Global state keymap
- “most” of the vim keybindings are here
-
Commands:
(evil-global-set-key state key def)
(define-key evil-normal-state-map key def)
-
Maps:
evil-normal-state-map
evil-insert-state-map
- etc.
-
Examples:
- bind-map evil-keys without override option
- Non-evil emulation-mode-maps
-
Minor mode keymaps
- All the minor mode maps that are set up without using evil functionality
- Example: bind-map keys tied to minor-mode and major-mode
-
Local keymap
-
Command:
(local-set-key key def)
- Example: major mode maps are here I believe
-
Command:
-
Global keymap
-
Command:
(global-set-key key def)
-
Map:
global-map
- Example: bind-map keys default location
-
Command:
Thanks to @justbur for this guide.