From 91caf41baaee47b3138455fe85d7df759ac682bc Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 12 Apr 2018 08:57:53 -0700 Subject: [emacs] Add hydra for magit. --- emacs.d/modules/module-git.el | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'emacs.d/modules') diff --git a/emacs.d/modules/module-git.el b/emacs.d/modules/module-git.el index f974bfe..350ba5e 100644 --- a/emacs.d/modules/module-git.el +++ b/emacs.d/modules/module-git.el @@ -1,10 +1,23 @@ (require 'config-package) +(defhydra hydra-magit (:color blue :hint nil :columns 3) + "magit" + ("RET" magit-visit-thing "visit magit things at point") + ("s" magit-status "status") + ("d" magit-diff "diff") + ("c" magit-commit "commit") + ("C" magit-commit-amend "commit-amend") + ("r" magit-rebase-interactive "rebase-interactive") + ("m" magit-merge "merge") + ("l" magit-log-current "log") + ("q" nil "exit")) + (use-package magit :mode (("differential-update-comments" . git-commit-mode) ("new-commit" . git-commit-mode)) - :bind (("C-x g s" . magit-status) + :bind (("C-c g" . hydra-magit/body) + ("C-x g s" . magit-status) ("C-x g b" . magit-checkout)) :init -- cgit 1.4.1