about summary refs log tree commit diff
path: root/configs/.emacs
diff options
context:
space:
mode:
Diffstat (limited to 'configs/.emacs')
-rw-r--r--configs/.emacs10
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))