mirror of
https://codeberg.org/scip/dot-emacs.git
synced 2025-12-17 04:20:57 +01:00
added smerge hydra
This commit is contained in:
33
.emacs
33
.emacs
@@ -1,4 +1,4 @@
|
|||||||
;; Toms Emacs Config - portable - version ("20190521.01") -*-emacs-lisp-*-
|
;; Toms Emacs Config - portable - version ("20190705.01") -*-emacs-lisp-*-
|
||||||
;; * Introduction
|
;; * Introduction
|
||||||
|
|
||||||
;; This is my emacs config, it is more than twenty years old. It
|
;; This is my emacs config, it is more than twenty years old. It
|
||||||
@@ -781,6 +781,9 @@
|
|||||||
;; 20190521.01
|
;; 20190521.01
|
||||||
;; - split agenda window left
|
;; - split agenda window left
|
||||||
|
|
||||||
|
;; 20190705.01
|
||||||
|
;; - added smerge hydra plus alias 'merge
|
||||||
|
|
||||||
;; ** TODO
|
;; ** TODO
|
||||||
|
|
||||||
;; - check helpful https://github.com/wilfred/helpful
|
;; - check helpful https://github.com/wilfred/helpful
|
||||||
@@ -808,7 +811,7 @@
|
|||||||
;; My emacs config has a version (consisting of a timestamp with a
|
;; My emacs config has a version (consisting of a timestamp with a
|
||||||
;; serial), which I display in the mode line. So I can clearly see, if
|
;; serial), which I display in the mode line. So I can clearly see, if
|
||||||
;; I'm using an outdated config somewhere.
|
;; I'm using an outdated config somewhere.
|
||||||
(defvar tvd-emacs-version "20190521.01")
|
(defvar tvd-emacs-version "20190705.01")
|
||||||
|
|
||||||
;; --------------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -5521,6 +5524,9 @@ defun."
|
|||||||
(magit-status dir)))
|
(magit-status dir)))
|
||||||
(define-key magit-mode-map (kbd "C") 'tvd-switch-magit-repo)
|
(define-key magit-mode-map (kbd "C") 'tvd-switch-magit-repo)
|
||||||
|
|
||||||
|
(require 'magit-gh-pulls)
|
||||||
|
(add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls)
|
||||||
|
|
||||||
;; via
|
;; via
|
||||||
;; http://manuel-uberti.github.io/emacs/2018/02/17/magit-bury-buffer/:
|
;; http://manuel-uberti.github.io/emacs/2018/02/17/magit-bury-buffer/:
|
||||||
;; a great enhancement, when closing the magit status buffer, ALL
|
;; a great enhancement, when closing the magit status buffer, ALL
|
||||||
@@ -5833,6 +5839,29 @@ T - tag prefix
|
|||||||
(ediff file1 file2)))
|
(ediff file1 file2)))
|
||||||
(add-to-list 'command-switch-alist '("diff" . command-line-diff))
|
(add-to-list 'command-switch-alist '("diff" . command-line-diff))
|
||||||
;; --------------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------------
|
||||||
|
;; *** Smerge Config
|
||||||
|
|
||||||
|
;; smerge-mode is being issued during editing of conflicts from magit,
|
||||||
|
;; however, I hate its default prefix, but don't have any practical
|
||||||
|
;; prefixes left AND am using it far too rare to deserve its own
|
||||||
|
;; prefix. So just a hydra will do.
|
||||||
|
|
||||||
|
(defhydra hydra-smerge (:color blue :timeout 30.0)
|
||||||
|
"
|
||||||
|
^Smerge Mode^
|
||||||
|
^^-------------------------------------------------------
|
||||||
|
_n_ext conflict keep _u_pper m_e_rge conflicts in Ediff
|
||||||
|
_p_revious conflict keep _l_ower _q_uit"
|
||||||
|
|
||||||
|
("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))
|
||||||
|
|
||||||
|
(defalias 'merge 'hydra-smerge/body)
|
||||||
|
;; --------------------------------------------------------------------------------
|
||||||
;; *** Projectile
|
;; *** Projectile
|
||||||
(require 'projectile)
|
(require 'projectile)
|
||||||
(projectile-mode +1)
|
(projectile-mode +1)
|
||||||
|
|||||||
Reference in New Issue
Block a user