[Emacs] Move Magit keybinds to package configuration

This commit is contained in:
Lucien Cartier-Tilet 2021-06-22 16:31:41 +02:00
parent 605fb06ab2
commit 3a13382c54
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -1702,19 +1702,33 @@ doing and what Git is doing! In short, I absolutely love it!
:defer t :defer t
:custom :custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)
:config :general
(progn (:keymaps '(git-rebase-mode-map)
(general-define-key
:keymaps '(git-rebase-mode-map)
"C-t" #'evil-next-line "C-t" #'evil-next-line
"C-s" #'evil-previous-line) "C-s" #'evil-previous-line)
(general-define-key (:keymaps 'git-rebase-mode-map
:keymaps 'git-rebase-mode-map :states 'normal
:state 'normal
:prefix "," :prefix ","
"," #'with-editor-finish "," #'with-editor-finish
"k" #'with-editor-cancel "k" #'with-editor-cancel
"a" #'with-editor-cancel))) "a" #'with-editor-cancel)
(:states 'normal
:prefix "SPC"
"g" '(nil :wk "git")
"gb" #'magit-blame
"gc" #'magit-clone
"gd" #'magit-dispatch
"gi" #'magit-init
"gs" #'magit-status
"gy" #'my/yadm
"gS" #'magit-stage-file
"gU" #'magit-unstage-file
"gf" '(nil :wk "file")
"gfd" #'magit-diff
"gfc" #'magit-file-checkout
"gfl" #'magit-file-dispatch
"gfF" #'magit-find-file))
#+end_src #+end_src
[[https://github.com/alphapapa][Alphapapa]] also created an awesome package for Magit: magit-todos which [[https://github.com/alphapapa][Alphapapa]] also created an awesome package for Magit: magit-todos which
@ -3914,21 +3928,6 @@ Undefining some stuff to make keybind prefixes work correctly.
"fr" #'counsel-recentf "fr" #'counsel-recentf
"fs" #'save-buffer "fs" #'save-buffer
"g" '(nil :wk "git")
"gc" #'magit-clone
"gd" #'magit-dispatch
"gi" #'magit-init
"gs" #'magit-status
"gy" #'my/yadm
"gS" #'magit-stage-file
"gU" #'magit-unstage-file
"gf" '(nil :wk "file")
"gfd" #'magit-diff
"gfc" #'magit-file-checkout
"gfl" #'magit-file-dispatch
"gfF" #'magit-find-file
"h" '(nil :wk "help") "h" '(nil :wk "help")
"hk" #'which-key-show-top-level "hk" #'which-key-show-top-level
"hd" '(nil :wk "describe") "hd" '(nil :wk "describe")