summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-11-25 22:43:11 +0000
committerjao <jao@gnu.org>2026-11-25 22:43:11 +0000
commit9842f1ee27c2839d082958a7d9c6b72be17dc92e (patch)
treeccb70891cfe757c8d039e3995204683978b8edb9 /init.el
parente1236d902dd7f7a6cf5a4396ad4074c1e30e7016 (diff)
downloadelibs-9842f1ee27c2839d082958a7d9c6b72be17dc92e.tar.gz
elibs-9842f1ee27c2839d082958a7d9c6b72be17dc92e.tar.bz2
more tweaks to window switching
Diffstat (limited to 'init.el')
-rw-r--r--init.el16
1 files changed, 7 insertions, 9 deletions
diff --git a/init.el b/init.el
index 2e75e94..78c8f17 100644
--- a/init.el
+++ b/init.el
@@ -980,12 +980,7 @@
(global-set-key (kbd "C-x _") #'delete-other-windows-vertically)
;;;; window navigation (custom)
-(mapc (lambda (n)
- (global-set-key (format "\C-c%s" (1+ n)) (jao-nth-window n)))
- '(0 1 2 3 4 5 6 7 8))
-
-(global-set-key "\C-xp" 'jao-prev-window)
-(global-set-key (kbd "M-o") #'jao-switch-with-previous-window)
+(jao-nth-window-activate)
;;;;; first window
(global-set-key (kbd "s-a") #'jao-switch-with-first-window)
@@ -1020,16 +1015,19 @@
(interactive)
(jao-switch-window--then "Switch to buffer" 'consult-buffer))
- (advice-add 'switch-window :before #'jao-save-current-window)
-
- :bind (("C-M-o" . switch-window)
+ :bind (("M-o" . jao-switch-with-previous-window)
+ ("C-x p" . jao-prev-window)
+ ("C-M-o" . switch-window)
("C-x o" . switch-window)
+ ("C-x 4 0" . switch-window-then-kill-buffer)
("C-x 4 d" . jao-switch-window-then-dired)
("C-x 4 f" . jao-switch-window-then-find-file)
("C-x 4 b" . jao-switch-window-then-consult-buffer)
("C-x 4 t" . switch-window-then-swap-buffer)
("C-x 4 T" . transpose-windows)))
+(jao-switch-window-activate 'switch-window)
+
;;;; winner mode
(winner-mode 1)