summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-07-29 00:45:19 -0400
committerKyle Meyer <kyle@kyleam.com>2015-07-29 00:45:19 -0400
commit7fbeddd8923bf2c65e81dab1303f2149b1fd812d (patch)
tree70e13630ef105cbfe549e1c7ab607a71cbd7be60 /lisp
parente01509451bf663ce7f470f9e3d65c81f4378d1d2 (diff)
downloademacs.d-7fbeddd8923bf2c65e81dab1303f2149b1fd812d.tar.gz
Add smerge hydra
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-git.el29
1 files changed, 29 insertions, 0 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index 9987fd3..9c4e0c9 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -498,4 +498,33 @@ function."
(setq magit-annex-all-action-arguments
(delete "--auto" magit-annex-all-action-arguments)))
+
+;;; Other git
+
+(define-key km/git-map "m"
+ (defhydra hydra-smerge (:hint nil)
+ "
+_b_ keep base _d_ diff _n_ next
+_m_ keep mine _e_ ediff _p_ previous
+_o_ keep other _h_ refine
+_a_ keep all
+\n"
+ ("b" smerge-keep-base)
+ ("m" smerge-keep-mine)
+ ("o" smerge-keep-other)
+ ("a" smerge-keep-all)
+ ("n" smerge-next)
+ ("p" smerge-prev)
+ ("h" smerge-refine)
+ ("e" smerge-ediff :color blue)
+ ("d" (call-interactively
+ (pcase (read-char-choice
+ "< base-mine, > base-other, = mine-other"
+ (list ?< ?> ?=))
+ (?< #'smerge-diff-base-mine)
+ (?> #'smerge-diff-base-other)
+ (?= #'smerge-diff-mine-other))))
+ ("l" recenter-top-bottom "recenter")
+ ("u" undo "undo")))
+
(provide 'init-git)