I have three windows:
1:zsh 2:vim* 3:htop
When I delete the current window (#2), I have these windows left:
1:zsh 3:htop
How can I make it so that it automatically renumbers them as
1:zsh 2:htop
If I recall correctly, this is the default behavior of GNU Screen. I know I could always :swap-window
, but I would like to know if this is possible automatically.
Best Answer
Let's do it more simply.
If you are using tmux below version 1.7, append next line to
~/.tmux.conf
:You could sort all windows, by typing
PREFIX-KEY
, then Ctrl + s.Else, if you are using tmux version 1.7 or above, as already everybody says, append next line to
~/.tmux.conf
: