summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck.cuny@gmail.com>2018-04-12 08:57:53 -0700
committerFranck Cuny <franck.cuny@gmail.com>2018-04-12 08:57:53 -0700
commit91caf41baaee47b3138455fe85d7df759ac682bc (patch)
tree1f4ed8c74fa72df9100ffd453af74adf290a42f3
parent[emacs] Add hydra for projectile. (diff)
downloademacs.d-91caf41baaee47b3138455fe85d7df759ac682bc.tar.gz
[emacs] Add hydra for magit.
-rw-r--r--emacs.d/modules/module-git.el15
1 files changed, 14 insertions, 1 deletions
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