From 89fb36465c5240c0526b743d5cbd01948b84dfbd Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 6 Feb 2019 00:20:57 -0500 Subject: [PATCH] Add SMerge hydra --- .emacs.d/init-hydra.el | 29 +++++++++++++++++++++++++++++ .emacs.d/init.el | 5 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.emacs.d/init-hydra.el b/.emacs.d/init-hydra.el index 858bbd5..3bad2d5 100644 --- a/.emacs.d/init-hydra.el +++ b/.emacs.d/init-hydra.el @@ -88,3 +88,32 @@ word: _w_: 1 char _W_: 0 char" ("w" avy-goto-word-1) ("W" avy-goto-word-0) ("q" nil)) + +(defhydra hydra-smerge + (:color pink :hint nil :post (smerge-auto-leave)) + " +^Move^ ^Keep^ ^Diff^ ^Other^ +^^-----------^^-------------------^^---------------------^^------- +_n_ext _b_ase _<_: upper/base _C_ombine +_p_rev _u_pper _=_: upper/lower _r_esolve +^^ _l_ower _>_: base/lower _k_ill current +^^ _a_ll _R_efine +^^ _RET_: current _E_diff _q_: cancel +" + ("n" smerge-next) + ("p" smerge-prev) + ("b" smerge-keep-base) + ("u" smerge-keep-upper) + ("l" smerge-keep-lower) + ("a" smerge-keep-all) + ("RET" smerge-keep-current) + ("\C-m" smerge-keep-current) + ("<" smerge-diff-base-upper) + ("=" smerge-diff-upper-lower) + (">" smerge-diff-base-lower) + ("R" smerge-refine) + ("E" smerge-ediff) + ("C" smerge-combine-with-next) + ("r" smerge-resolve) + ("k" smerge-kill-current) + ("q" nil :color blue)) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index da6eb86..39776d1 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -415,8 +415,9 @@ :bind (("C-c w" . 'hydra-window/body) ("C-c s" . 'hydra-shortcuts/body) ("C-c a" . 'hydra-avy/body) - ("C-c c" . 'hydra-mc-manual/body)) - :bind* ("C-," . 'hydra-mc/body)) ; I like my binding, stop messing with it + ("C-c c" . 'hydra-mc-manual/body) + ("C-^" . 'hydra-smerge/body)) + :bind* ("C-," . 'hydra-mc/body)) ; I like my binding, stop messing with it (use-package multiple-cursors :ensure)