diff options
| author | Simon Parri <simonparri@ganzeria.com> | 2025-10-23 10:05:56 -0500 |
|---|---|---|
| committer | Simon Parri <simonparri@ganzeria.com> | 2025-10-23 10:05:56 -0500 |
| commit | ffd663a8cdddcb28e1a475eea7643f806a774593 (patch) | |
| tree | 0175dbde991241d58e2e2d240df93d72271e3583 | |
| parent | 7a3e52bb1d3250a1c0c9c5c37c6fb854055fbc58 (diff) | |
| download | dotfiles-ffd663a8cdddcb28e1a475eea7643f806a774593.tar.gz dotfiles-ffd663a8cdddcb28e1a475eea7643f806a774593.zip | |
Emacs: Add command and keybinding to go to MRU window
| -rw-r--r-- | common/.emacs.d/init.el | 9 |
1 files changed, 8 insertions, 1 deletions
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-<tab>" ace-window) + ("s-<tab>" go-other-window) + ("C-s-<tab>" ace-window) ("s-t" tab-bar-new-tab) ("s-T" tab-bar-close-tab) |
