fix(magit): unbind M-1 etc. for code-review

code-review is built on magit-sections so it will have the same default
bindings for M-1, M-2 etc. To be consistent with the rest of doom, those
should be used for switching workspace and z1, z2 etc should be used for
toggling outlines in a magit-sections buffer.

This only affects users with :editor (evil +everywhere) enabled.

Amend: 2d3a68df49
This commit is contained in:
Björn Larsson 2021-12-17 19:32:59 +01:00 committed by Henrik Lissner
parent 024df7ad8b
commit 1a0fd1b7ec

View file

@ -234,6 +234,9 @@ ensure it is built when we actually use Forge."
;; especially when traversing modes in magit buffers. ;; especially when traversing modes in magit buffers.
(evil-define-key* 'normal magit-status-mode-map [escape] nil) (evil-define-key* 'normal magit-status-mode-map [escape] nil)
(after! code-review
(undefine-key! code-review-mode-map "M-1" "M-2" "M-3" "M-4" "1" "2" "3" "4" "0"))
;; Some extra vim-isms I thought were missing from upstream ;; Some extra vim-isms I thought were missing from upstream
(evil-define-key* '(normal visual) magit-mode-map (evil-define-key* '(normal visual) magit-mode-map
"%" #'magit-gitflow-popup "%" #'magit-gitflow-popup