Prefer windows when popping global marks.
When popping the global mark ring with pop-global-mark (C-x C-SPC), Emacs switches the current window's buffer to the target buffer. This can be disorienting when the target buffer is already visible in another window.
Simpler modifies that behavior: if the target buffer is already displayed in a window, it switches to that window instead.
Disclaimer: This is hella vibe coded.
The simplest way to install simpler.el is by using use-package with the :vc keyword:
(use-package simpler
:vc (:url "https://github.com/marlonschlosshauer/simpler.el" :rev :newest)
:config
(simpler-mode 1))Enable simpler-mode to activate the modified behavior:
(simpler-mode 1)To disable:
(simpler-mode -1)