If you enjoy using windmove
, this package is an add-on for you: it
has variants of the windmove
commands which swap the buffers as you
move, so that you get the effect of "dragging" windows around
directionally with the arrow keys.
Update: as of Emacs 27.1, there are windmove-swap-*
commands that
are mostly identical to this package, with the exception that they
will happily swap the contents of dedicated windows, while windswap
refuses to do so: this seems like a better behaviour to me.
You can install windswap
from the
MELPA repository. The version of
windswap
there will always be up-to-date.
Add global key bindings for windswap
's commands manually, or use the
convenient windswap-default-keybindings
function.
(windmove-default-keybindings 'control)
(windswap-default-keybindings 'control 'shift)
Author: Steve Purcell
Homepage: https://github.com/purcell/windswap
This little library was extracted from the author's full Emacs configuration, which readers might find of interest.