feat(magit): add evil keybinds for code-review
Add the two main keybindings expected in the README of code-review: `r` for a transient menu with all actions and `RET` to add or edit a comment. Both should only be enabled while in a `*Code Review*` buffer. Ref: https://github.com/wandersoncferreira/code-review
This commit is contained in:
parent
893b4171b7
commit
09b3004abe
1 changed files with 4 additions and 1 deletions
|
@ -236,7 +236,10 @@ ensure it is built when we actually use Forge."
|
||||||
(evil-define-key* 'normal magit-status-mode-map [escape] nil)
|
(evil-define-key* 'normal magit-status-mode-map [escape] nil)
|
||||||
|
|
||||||
(after! code-review
|
(after! code-review
|
||||||
(undefine-key! code-review-mode-map "M-1" "M-2" "M-3" "M-4" "1" "2" "3" "4" "0"))
|
(undefine-key! code-review-mode-map "M-1" "M-2" "M-3" "M-4" "1" "2" "3" "4" "0")
|
||||||
|
(map! :map code-review-mode-map
|
||||||
|
:n "r" #'code-review-transient-api
|
||||||
|
:n "RET" #'code-review-comment-add-or-edit))
|
||||||
|
|
||||||
;; 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue