From 4b8a88cec1bd7e875ea16fb63a2f43024fc357de Mon Sep 17 00:00:00 2001 From: jao Date: Wed, 10 Feb 2021 01:16:01 +0000 Subject: switch-window for ace-window --- init.org | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/init.org b/init.org index a33b4cd..7efbe1d 100644 --- a/init.org +++ b/init.org @@ -1293,20 +1293,24 @@ (global-set-key (kbd "C-x _") #'delete-other-windows-vertically) #+end_src -*** ace-window +*** Switch window + An alternative for this one is ace-window, but it has the problem + of not displaying its overlay over org buffers (sometimes) and + introducing a dependency (avy). #+begin_src emacs-lisp - (use-package ace-window + (use-package switch-window :ensure t - :init (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) - aw-char-position 'left ;; 'top-left - aw-ignore-current nil - aw-dispatch-when-more-than 3 ;; 2 - aw-leading-char-style 'path - aw-display-mode-overlay t - aw-scope 'frame) - :bind (("M-o" . ace-window) - ("M-O" . ace-swap-window) - ("C-x p" . ace-window))) + :demand t + :custom ((switch-window-minibuffer-shortcut ?z) + (switch-window-background t) + (switch-window-shortcut-style querty) + (switch-window-timeout 7) + (switch-window-threshold 3)) + :bind (("M-o" . switch-window) + ("M-O" . switch-window-then-swap-buffer) + ("C-x 4 d" . switch-window-then-dired) + ("C-x 4 f" . switch-window-then-find-file) + ("C-x 4 b" . switch-window-then-display-buffer))) #+end_src *** first window and transient other window #+begin_src emacs-lisp -- cgit v1.2.3