From a3a9584d257565ae77272bdc7ef7b571bb2d4bcd Mon Sep 17 00:00:00 2001 From: MitchMarq42 Date: Mon, 13 Mar 2023 14:47:06 -0800 Subject: [PATCH] search: `nnoremap n nzz` etc --- lisp/mitch-defuns.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/mitch-defuns.el b/lisp/mitch-defuns.el index 2422fea..c08be30 100644 --- a/lisp/mitch-defuns.el +++ b/lisp/mitch-defuns.el @@ -28,7 +28,11 @@ Made solely to reduce lines in the init-file." (interactive) (evil-next-line) (scroll-up-line)) - ) + ;; Search showing + (defun mitch/search-and-rebalance (&optional &rest flush) + (evil-scroll-line-to-center (car flush))) + (advice-add 'evil-search-next :filter-return #'mitch/search-and-rebalance) + (add-hook 'isearch-mode-end-hook #'mitch/search-and-rebalance)) (defun mitch/visual-setup () "Commands to run when setting up any display. To be called in use-package declarations for color schemes."