How to switch directly to a pane in Tmux

tmux

I'd like to switch directly to a pane in Tmux, by pane #.

How can I do this? I know how to cycle between panes, and move to panes that are beside the current pane.

I'd like to be able to run the display-panes command, which shows the "pane #" on each pane, then later on jump directly to a pane using the pane #'s that were displayed by display-panes.

Is this possible?

NOTE: And just to be clear, I don't mean window, I mean pane. Thanks!

Best Answer

You can jump directly to a pane by typing pane's index while it is showed by display-panes command.

From man tmux:

display-panes [-t target-client]
                   (alias: displayp)
             Display a visible indicator of each pane shown by target-client.
             See the display-panes-time, display-panes-colour, and
             display-panes-active-colour session options.  While the indicator
             is on screen, a pane may be selected with the ‘0’ to ‘9’ keys.

Or instead of typing command, you can use:

C-b q
  • C-b send prefix key
  • q display panes indexes