mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2026-08-24 05:34:18 +02:00
Compare commits
4 Commits
f246281bc4
...
9aae50bc5c
| Author | SHA1 | Date | |
|---|---|---|---|
| 9aae50bc5c | |||
| 9659ad8b58 | |||
| 1ce0a66378 | |||
| 301d837851 |
@@ -44,20 +44,35 @@
|
||||
;; prefix. So just a hydra will do.
|
||||
|
||||
(when (fboundp 'defhydra)
|
||||
(defhydra hydra-smerge (:color blue :timeout 30.0)
|
||||
(defhydra hydra-smerge (:timeout 30.0 :exit nil)
|
||||
"
|
||||
^Smerge Mode^
|
||||
^^-------------------------------------------------------
|
||||
_n_ext conflict keep _u_pper m_e_rge conflicts in Ediff
|
||||
_p_revious conflict keep _l_ower _q_uit"
|
||||
^^--------------------------------------------------------------
|
||||
_n_: next conflict _u_: keep upper _s_: swap
|
||||
_p_: revious conflict _l_: keep lower _h_: highlight
|
||||
_e_: Ediff _b_: keep base _r_: resolve
|
||||
_q_: quit _RET_: keep hunk@point _R_: revert
|
||||
|
||||
("n" smerge-next nil :exit nil)
|
||||
("p" smerge-prev nil :exit nil)
|
||||
("u" smerge-keep-upper nil :exit nil)
|
||||
("l" smerge-keep-lower nil :exit nil)
|
||||
("e" smerge-ediff nil :color red)
|
||||
("q" nil nil :color red))
|
||||
^^--------------------------------------------------------------
|
||||
Reach this hydra with <C-x m>
|
||||
^^--------------------------------------------------------------
|
||||
|
||||
"
|
||||
|
||||
("n" smerge-next nil)
|
||||
("p" smerge-prev nil)
|
||||
("u" smerge-keep-upper nil)
|
||||
("l" smerge-keep-lower nil)
|
||||
("b" smerge-keep-base nil)
|
||||
("RET" smerge-keep-current nil)
|
||||
("h" smerge-refine nil)
|
||||
("s" smerge-swap nil)
|
||||
("r" smerge-resolve nil)
|
||||
("R" undo-tree-undo nil)
|
||||
("e" smerge-ediff nil :color blue)
|
||||
("q" nil nil :color blue))
|
||||
|
||||
(global-set-key (kbd "C-x m") 'hydra-smerge/body)
|
||||
(defalias 'merge 'hydra-smerge/body))
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
;; the hassle to go to status before just committing etc. So:
|
||||
(("C-c g" . magit-file-dispatch))
|
||||
|
||||
:hook
|
||||
|
||||
;; automatically fire up smerge hydra when visiting a buffer
|
||||
;; containing merge conflict[s]. Hydra see init-ediff.el
|
||||
(magit-diff-visit-file . (lambda ()
|
||||
(hydra-smerge/body)))
|
||||
|
||||
:config
|
||||
(magit-todos-mode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user