I'm trying Emacs+Evil after almost two decades as a Vim user. I'm moving most of my Vim configuration to Evil but one thing that I'm having a lot of problems is to set the search and highlighting like the one I use with Vim. What I'm trying to get is to have non-incremental search and the highlights to remain until I clear them manually or make another search.
I've set these settings on my config file:
;; keep the search highlights
(setq lazy-highlight-cleanup nil)
(setq lazy-highlight-max-at-a-time nil)
(setq lazy-highlight-initial-delay 0)
Using the /
key to search with Evil does the incremental thing and also the highlights are removed as soon as I press any other movement key (like j
key but with C-s
(emacs internal i-search) the highlights remain. With C-s RET
(non incremental search) the highlights doesn't remain.
/
key to the builtin non-incremental search. SeeC-h k <your key>
to see the function's name. So something like(define-key evil-normal-state-map "/" 'search-forward)
? – Ehvince