feature/evil: recenter window after / * or #

This commit is contained in:
Henrik Lissner 2019-03-09 02:43:07 -05:00
parent 54d1c0dd56
commit 419c3ba1e6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 10 additions and 1 deletions

View file

@ -37,7 +37,7 @@ detected.")
hscroll-margin 2
hscroll-step 1
scroll-conservatively 1001
scroll-margin 0
scroll-margin 2
scroll-preserve-screen-position t
;; Whitespace (see `editorconfig')
indent-tabs-mode nil

View file

@ -121,6 +121,15 @@ line with a linewise comment.")
(advice-add #'evil-open-above :around #'+evil*insert-newline-above-and-respect-comments)
(advice-add #'evil-open-below :around #'+evil*insert-newline-below-and-respect-comments)
;; Recenter screen after most searches
(advice-add! '(evil-visualstar/begin-search-forward
evil-visualstar/begin-search-backward
evil-ex-search-word-backward
evil-ex-search-word-backward
evil-ex-search-forward
evil-ex-search-backward)
:after #'doom*recenter)
;; --- custom interactive codes -----------
;; These arg types will highlight matches in the current buffer
(evil-ex-define-argument-type buffer-match :runner +evil-ex-buffer-match)