about summary refs log tree commit diff stats
path: root/.emacs.d
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2023-01-06 16:16:36 +0000
committerDavid Morgan <djm_uk@protonmail.com>2023-01-06 16:16:36 +0000
commit8a8b4965c385d4fc60b543d47cdb46fdf06684b2 (patch)
treecfc7e7c11b99aa149c500723215906a4db2045b2 /.emacs.d
parent10ec570ba5020dfc47e406a2df71ed4f2542ebd1 (diff)
downloaddotfiles-8a8b4965c385d4fc60b543d47cdb46fdf06684b2.tar.gz
Use avy-style keys for ace-window, and add always dispatch version
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/init-windows.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/.emacs.d/lisp/init-windows.el b/.emacs.d/lisp/init-windows.el
index 7ce27b5..ebdef31 100644
--- a/.emacs.d/lisp/init-windows.el
+++ b/.emacs.d/lisp/init-windows.el
@@ -68,9 +68,17 @@
 
 (use-package ace-window
   :diminish
+  :config
+  (defun ace-window-always-dispatch (arg)
+    "Call `ace-window' with `aw-dispatch-always' set to t, passing through `ARG'."
+    (interactive "p")
+    (let ((aw-dispatch-always t))
+      (ace-window arg)))
   :bind
   ([remap other-window] . ace-window)
-  ("C-<tab>" . ace-window)
+  ("C-x O" . ace-window-always-dispatch)
+  :custom
+  (aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l))
   :custom-face
   (aw-leading-char-face
    ((t (:foreground "white" :background "red"