[vc] Make smerge ts use emacs version specific functions
this affects smerge-next vs smerge-vc-next-conflict, which is only available from emacs 27 on, which will check for conflicts in all open buffers.
This commit is contained in:
parent
f928c32eec
commit
e5a180e78d
|
@ -211,12 +211,12 @@ Use ~SPC g .~ to enter a transient state for quickly navigating between hunks in
|
|||
** Smerge Mode Transient-state
|
||||
Movement:
|
||||
|
||||
| Key binding | Description |
|
||||
|----------------------------+------------------------------------------|
|
||||
| ~SPC g r n~ | Next conflict (possibly in another file) |
|
||||
| ~SPC g r N~ or ~SPC g r p~ | Previous conflict |
|
||||
| ~SPC g r j~ | Go to next line |
|
||||
| ~SPC g r k~ | Go to previous line |
|
||||
| Key binding | Description |
|
||||
|----------------------------+----------------------------------------------|
|
||||
| ~SPC g r n~ | Next conflict (possibly in another file) |
|
||||
| ~SPC g r N~ or ~SPC g r p~ | Previous conflict (possibly in another file) |
|
||||
| ~SPC g r j~ | Go to next line |
|
||||
| ~SPC g r k~ | Go to previous line |
|
||||
|
||||
Merge Actions:
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
(git-gutter+ :toggle (eq 'git-gutter+ version-control-diff-tool))
|
||||
(git-gutter-fringe+ :toggle (eq 'git-gutter+ version-control-diff-tool))
|
||||
(smerge-mode :location built-in)
|
||||
(vc :location built-in)
|
||||
))
|
||||
(vc :location built-in)))
|
||||
|
||||
|
||||
(defun version-control/init-vc ()
|
||||
(use-package vc
|
||||
|
@ -192,22 +192,22 @@
|
|||
"..X...."
|
||||
"XXXXX.."
|
||||
"..X...."
|
||||
"..X...."
|
||||
)
|
||||
"..X....")
|
||||
|
||||
(fringe-helper-define 'git-gutter-fr:deleted nil
|
||||
"......."
|
||||
"......."
|
||||
"XXXXX.."
|
||||
"......."
|
||||
"......."
|
||||
)
|
||||
".......")
|
||||
|
||||
(fringe-helper-define 'git-gutter-fr:modified nil
|
||||
"..X...."
|
||||
".XXX..."
|
||||
"XX.XX.."
|
||||
".XXX..."
|
||||
"..X...."
|
||||
))))
|
||||
"..X...."))))
|
||||
|
||||
|
||||
(defun version-control/init-git-gutter+ ()
|
||||
(use-package git-gutter+
|
||||
|
@ -228,8 +228,8 @@
|
|||
git-gutter+-hide-gutter t))
|
||||
;; identify magit changes
|
||||
:config
|
||||
(spacemacs|hide-lighter git-gutter+-mode)
|
||||
))
|
||||
(spacemacs|hide-lighter git-gutter+-mode)))
|
||||
|
||||
|
||||
(defun version-control/init-git-gutter-fringe+ ()
|
||||
(use-package git-gutter-fringe+
|
||||
|
@ -249,22 +249,22 @@
|
|||
"..X...."
|
||||
"XXXXX.."
|
||||
"..X...."
|
||||
"..X...."
|
||||
)
|
||||
"..X....")
|
||||
|
||||
(fringe-helper-define 'git-gutter-fr+-deleted nil
|
||||
"......."
|
||||
"......."
|
||||
"XXXXX.."
|
||||
"......."
|
||||
"......."
|
||||
)
|
||||
".......")
|
||||
|
||||
(fringe-helper-define 'git-gutter-fr+-modified nil
|
||||
"..X...."
|
||||
".XXX..."
|
||||
"XX.XX.."
|
||||
".XXX..."
|
||||
"..X...."
|
||||
))))
|
||||
"..X...."))))
|
||||
|
||||
|
||||
|
||||
(defun version-control/init-smerge-mode ()
|
||||
|
@ -280,8 +280,8 @@
|
|||
spacemacs--smerge-ts-full-hint
|
||||
"\n
|
||||
Movement^^^^ Merge Action^^ Diff^^ Other
|
||||
-------------------^^^^ ----------------^^ --------------^^ ---------------------------^^
|
||||
[_n_]^^ next conflict [_b_] keep base [_<_] base/mine [_C_] combine curr/next hunks
|
||||
-------------------^^^^ ----------------^^ --------------^^ -------------------------------^^
|
||||
[_n_]^^ next conflict [_b_] keep base [_<_] base/mine [_C_] combine curr/next conflicts
|
||||
[_N_/_p_] prev conflict [_m_] keep mine [_=_] mine/other [_u_] undo
|
||||
[_j_]^^ next line [_a_] keep all [_>_] base/other [_q_] quit
|
||||
[_k_]^^ prev line [_o_] keep other [_r_] refine
|
||||
|
@ -293,7 +293,7 @@
|
|||
:dynamic-hint (spacemacs//smerge-ts-hint)
|
||||
:bindings
|
||||
;; move
|
||||
("n" smerge-vc-next-conflict)
|
||||
("n" (if (version< emacs-version "27") (smerge-next) (smerge-vc-next-conflict)))
|
||||
("N" smerge-prev)
|
||||
("p" smerge-prev)
|
||||
("j" evil-next-line)
|
||||
|
|
Loading…
Reference in New Issue