How can I efficiently reorder windows in tmux? For example, having this set of windows:
0:zsh 1:elinks 2:mutt 3:irssi 4:emacs 5:rss 6:htop
What would I have to do to move rss
to between elinks
and mutt
, ending up with:
0:zsh 1:elinks 2:rss 3:mutt 4:irssi 5:emacs 6:htop
I know how to use move-window
to move a window to a yet-unused index, and I could use a series of them to achieve this—but, obviously, this is very tedious.
Best Answer
swap-window
can help you:It moves current window to the left by one position.
From man tmux:
You can bind it to a key:
Then you can use
Shift+Left
andShift+Right
to change current window position.