summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-02-10 01:16:01 +0000
committerjao <jao@gnu.org>2021-02-10 01:16:01 +0000
commit4b8a88cec1bd7e875ea16fb63a2f43024fc357de (patch)
tree13b8111ef148c1154c21a9a86453cf6a3593e010 /init.org
parent217c3ab9cddb1e59aabcd48c634ad3bd6732d33a (diff)
downloadelibs-4b8a88cec1bd7e875ea16fb63a2f43024fc357de.tar.gz
elibs-4b8a88cec1bd7e875ea16fb63a2f43024fc357de.tar.bz2
switch-window for ace-window
Diffstat (limited to 'init.org')
-rw-r--r--init.org28
1 files 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