feat(emacs): Run :nohl on ESC
This commit is contained in:
@@ -49,6 +49,17 @@
|
|||||||
;; the echo area.
|
;; the echo area.
|
||||||
(evil-ex-define-cmd "mes[sages]" #'view-echo-area-messages)
|
(evil-ex-define-cmd "mes[sages]" #'view-echo-area-messages)
|
||||||
|
|
||||||
|
;; On ESC, remove highlighted search results.
|
||||||
|
(defun syd-evil-nohl-h ()
|
||||||
|
"If any Evil Ex search highlightings are active, remove them and return t.
|
||||||
|
Otherwise, nil."
|
||||||
|
(let ((names '(evil-ex-substitute evil-ex-search)))
|
||||||
|
(if (-any #'evil-ex-hl-active-p names)
|
||||||
|
(progn (evil-ex-nohighlight)
|
||||||
|
t)
|
||||||
|
nil)))
|
||||||
|
(add-hook 'syd-escape-hook #'syd-evil-nohl-h)
|
||||||
|
|
||||||
(evil-mode 1))
|
(evil-mode 1))
|
||||||
|
|
||||||
(defvar evil-collection-key-blacklist)
|
(defvar evil-collection-key-blacklist)
|
||||||
|
|||||||
Reference in New Issue
Block a user