(Tmux) Renumbering a window
Useful e.g. when there are 3 windows (0,1,2), you close window#1 so now there are windows #0 and #2, and you wish to make the remaining windows have contiguous indices.
- Run
<C-b> .
within the window to be renumbered, and enter the new index for the window. - Equivalently, run
:move-window -t <N>
where<N>
is the target index. - To swap the indices of two existing windows with indices
<A>
and<B>
, run:swap-window -s <A> -t <B>
.
References:
Written on May 22, 2021