From 95f29614402f3b093500b4e70366b20c96732cd4 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 10 Aug 2020 12:31:57 +0100 Subject: +prompt for buffer on window split advice --- Emacs/.config/emacs/config.org | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index 4a8d30f..16ec39d 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -199,7 +199,9 @@ leader-map at "SPC". #+BEGIN_SRC emacs-lisp (use-package evil :init - (setq evil-want-keybinding nil) + (setq evil-want-keybinding nil + evil-split-window-below t + evil-vsplit-window-right t) :config (evil-mode +1) (evil-define-key 'normal global-map @@ -378,6 +380,15 @@ package comes in. :general (leader "st" #'counsel-etags-find-tag)) #+END_SRC +* Prompt buffer switch +Essentially add advice to the window split functions so that they run +ivy-switch-buffer once they're finished. +#+BEGIN_SRC emacs-lisp +(with-eval-after-load "ivy" + (with-eval-after-load "evil" + (advice-add #'evil-window-vsplit :after #'ivy-switch-buffer) + (advice-add #'evil-window-split :after #'ivy-switch-buffer))) +#+END_SRC * Avy Setup avy with leader. #+BEGIN_SRC emacs-lisp -- cgit v1.2.3-13-gbd6f