From ffd663a8cdddcb28e1a475eea7643f806a774593 Mon Sep 17 00:00:00 2001 From: Simon Parri Date: Thu, 23 Oct 2025 10:05:56 -0500 Subject: Emacs: Add command and keybinding to go to MRU window --- common/.emacs.d/init.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/.emacs.d/init.el b/common/.emacs.d/init.el index cc1ef49..7269a7b 100644 --- a/common/.emacs.d/init.el +++ b/common/.emacs.d/init.el @@ -244,6 +244,12 @@ (interactive) (switch-to-buffer (other-buffer (current-buffer)) nil t)) + (defun go-other-window (&optional arg) + (interactive "P") + (select-window + (get-mru-window (when arg 'visible) + nil 'not-selected))) + (defun kill-buffer-and-maybe-window () (interactive) (if (not (one-window-p)) @@ -4288,7 +4294,8 @@ instead." ("s-j" switch-to-buffer) ("s-J" go-other-buffer) - ("s-" ace-window) + ("s-" go-other-window) + ("C-s-" ace-window) ("s-t" tab-bar-new-tab) ("s-T" tab-bar-close-tab) -- cgit v1.2.3