From 48261f6c82a1ff61801fb6595e75b8a7f044e327 Mon Sep 17 00:00:00 2001 From: Thomas von Dein Date: Tue, 13 Jun 2023 19:24:53 +0200 Subject: [PATCH] Stupid me! A couple of years ago I added this hydra and forgone my beloved M-o command to cycle through all windows, because I thought this is better. However, whenever I have more than 2 windows and need to switch, this hydra appears and I hesitate, because the workflow just doesn't fit to my muscle memory for whatever reasons. Now I just added M-o to the list of subcommands which cycles through the windows! Just as in the earlier days! I am so happy with it and in the same time embarrased of myself that I didn't think earlier about this solution! --- lisp/init-windowmgmt.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/init-windowmgmt.el b/lisp/init-windowmgmt.el index 9322d6e..a3b0fb7 100644 --- a/lisp/init-windowmgmt.el +++ b/lisp/init-windowmgmt.el @@ -74,7 +74,7 @@ (when (and (fboundp 'windmove-up) (fboundp 'buf-move-up) (fboundp 'defhydra)) (defhydra hydra-switch-windows (:color pink: :timeout 2.5) " -Switch to buffer: ← ↑ → ↓ | _o_: previous | _f_: flip | MOVE: _u_: up _d_: down _l_: left _r_: right" +Switch to buffer: ← ↑ → ↓ | _o_: previous | _f_: flip | MOVE: _u_: up _d_: down _l_: left _r_: right _M-o_: cycle" ("" windmove-up nil) ("" windmove-down nil) ("" windmove-left nil) @@ -85,6 +85,7 @@ Switch to buffer: ← ↑ → ↓ | _o_: previous | _f_: flip | MOVE: _u_: up ("d" buf-move-down nil :color blue) ("l" buf-move-left nil :color blue) ("r" buf-move-right nil :color blue) + ("M-o" other-window nil :color blue) ("q" nil nil :color red)) ;; via [[http://mbork.pl/2017-02-26_other-window-or-switch-buffer][mbork]]