tools/magit: free up 0-4 keys for evil & bind g=

- Replaces 0 with g= (magit-diff-default-context)
- Unbinds 1-4 keys so you can use numbered motions in magit buffers
  again
This commit is contained in:
Henrik Lissner 2019-10-19 17:42:31 -04:00
parent 92a5b5fb93
commit 7f0ca974e9
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -131,11 +131,16 @@ ensure it is built when we actually use Forge."
(setq evil-magit-state 'normal
evil-magit-use-z-for-folds t)
:config
(unmap! magit-mode-map "M-1" "M-2" "M-3" "M-4") ; replaced by z1, z2, z3, etc
(unmap! magit-mode-map
;; Replaced by z1, z2, z3, etc
"M-1" "M-2" "M-3" "M-4"
"1" "2" "3" "4"
"0") ; moved to g=
(evil-define-key* 'normal magit-status-mode-map [escape] nil) ; q is enough
(evil-define-key* '(normal visual) magit-mode-map
"%" #'magit-gitflow-popup
"zz" #'evil-scroll-line-to-center
"%" #'magit-gitflow-popup)
"g=" #'magit-diff-default-context)
(define-key! 'normal
(magit-status-mode-map
magit-stash-mode-map