diff options
author | William Carroll <wpcarro@gmail.com> | 2017-06-23T15·45-0400 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2017-06-23T15·45-0400 |
commit | bcde7fabc420e4df9b70999d77037c4510816a80 (patch) | |
tree | 2ff900f75c3cad20b16e58c57508b1b03eed01b6 /configs/.emacs | |
parent | b757f26394be80941854f81f999647ffde48d5c6 (diff) |
Centers evil search results vertically on a page
Diffstat (limited to 'configs/.emacs')
-rw-r--r-- | configs/.emacs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configs/.emacs b/configs/.emacs index 33d8c7616095..26200221dcba 100644 --- a/configs/.emacs +++ b/configs/.emacs @@ -334,6 +334,16 @@ (setq evil-replace-state-cursor '("VioletRed3" bar)) (setq evil-operator-state-cursor '("VioletRed3" hollow)) (evil-ex-define-cmd (kbd "w") 'save-buffer-always) + + ;; center search results + (defadvice evil-search-next + (after center-evil-search-next) + (call-interactively 'evil-scroll-line-to-center)) + + (defadvice evil-search-previous + (after center-evil-search-previous) + (call-interactively 'evil-scroll-line-to-center)) + (add-hook 'org-mode-hook 'evil-local-mode)) |