Normally, I can jump to a window in tmux using Prefix-N
, where N
is my window number.
Unfortunately, if N
is number of like 10
, it will just jump to window 1
.
How can I jump to Window 10
instead?
The swap-window command is closest to what you want. to let window number 3 and window number 1 swap their positions. (if base-index is 0, as it is by default). Command move-window -t <NUMBER> is by default bound to Ctrl + B , . .
prefix+w. By default, tmux comes with a tmux choose-tree command bound to prefix+w , which opens in full screen. The upper section of the screen will show every window opened.
ctrl-b, <arrow key> switch to the pane in whichever direction you press. ctrl-b, d. detach from tmux, leaving everything running in the background.
There are two straightforward options (let C-b
represent the prefix key):
C-b '
(this is a default key binding). Press enter after inputting the desired index.C-b w
(also a default key binding). In this list, windows are assigned a character in order from 0
to 9
and then from a
onward. Press a character to jump to the corresponding window or use the arrow keys to highlight one and press enter.Although option 2 is fewer keystrokes (using the characters), it's arguably less elegant than option 1. First, the window list completely obscures the current pane; second, indices are assigned to windows based on their order, meaning that the index in the list may sometimes differ from the index displayed in the window titles (such as when there are gaps in the window numbering).
If you're looking for the least intrusive and most analogous (compared to C-b N
) solution, option 1 is probably your best bet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With