Make evil backspace/DEL respect delete-selection-mode
Perhaps this should be fixed upstream?
This commit is contained in:
parent
cd3f1399af
commit
40a35392d1
1 changed files with 7 additions and 0 deletions
|
@ -161,6 +161,13 @@ directives. By default, this only recognizes C directives.")
|
|||
(advice-add #'evil-open-above :around #'+evil--insert-newline-above-and-respect-comments-a)
|
||||
(advice-add #'evil-open-below :around #'+evil--insert-newline-below-and-respect-comments-a)
|
||||
|
||||
;; Fix backspace/DEL commands not respecting `delete-selection-mode'
|
||||
(defadvice! +evil-delete-region-if-mark-a (orig-fn &rest args)
|
||||
:around '(evil-delete-backward-word evil-delete-backward-char-and-join)
|
||||
(if (and (bound-and-true-p delete-selection-mode) mark-active)
|
||||
(call-interactively #'backward-delete-char-untabify)
|
||||
(apply orig-fn args)))
|
||||
|
||||
;; Recenter screen after most searches
|
||||
(dolist (fn '(evil-visualstar/begin-search-forward
|
||||
evil-visualstar/begin-search-backward
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue