editor/evil: fix csw, csW, css, & csp text objects
Until cute-jumper/evil-embrace.el#7 is merged.
This commit is contained in:
parent
363f27b58a
commit
1ebfa35b71
1 changed files with 10 additions and 0 deletions
|
@ -277,6 +277,16 @@ directives. By default, this only recognizes C directives.")
|
||||||
:config
|
:config
|
||||||
(setq evil-embrace-show-help-p nil)
|
(setq evil-embrace-show-help-p nil)
|
||||||
|
|
||||||
|
;; REVIEW Remove when cute-jumper/evil-embrace.el#7 is merged
|
||||||
|
(pushnew! evil-embrace-evil-surround-keys ?w ?W ?p ?s)
|
||||||
|
(defadvice! +evil-embrace-evil-surround-change-a (orig-fn char &optional outer inner)
|
||||||
|
"Fix csw, csW, css & csp text objects too eagerly deleting regions."
|
||||||
|
:around #'evil-embrace-evil-surround-change
|
||||||
|
(letf! (defun evil-surround-delete (char &optional outer inner)
|
||||||
|
(unless (evil-surround-delete-char-noop-p char)
|
||||||
|
(funcall evil-surround-delete char outer inner)))
|
||||||
|
(funcall orig-fn char outer inner)))
|
||||||
|
|
||||||
(defun +evil-embrace-scala-mode-hook-h ()
|
(defun +evil-embrace-scala-mode-hook-h ()
|
||||||
(embrace-add-pair ?$ "${" "}"))
|
(embrace-add-pair ?$ "${" "}"))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue