In tmux
, the default behavior for processing C-b 0
is to jump to window 0. I would like C-b C-0
to jump to pane 0 in the current window. My attempts at adding,
bind-key C-0 select-pane -t 0
to my .tmux.conf
have failed. Is there something else I'm missing?
ctrl + b + " to make a Horizontal split. ctrl + b + left arrow to move to the left pane. ctrl + b + " to make a Horizontal split.
Key binding By default, Ctrl + b , ! would break the active pane into a new window and switch to it. Where Ctrl + b is the default prefix for tmux.
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.
Not exactly the way you are looking for, but I doubt you have a reason not to love the following:
display-panes
or the likes (<prefix> + q
by default),You need to modify your terminal so that tmux can recognise control+digit keystrokes correctly. (source: https://unix.stackexchange.com/questions/96884/using-ctrl0-9-to-cycle-between-windows-using-tmux)
If you are using iTerm2, for example, then:
Preferences > Profiles > Keys
and click +
Send Escape Sequence
from the action drop-down menuEsc+[27;5;48~
in the characters to send textboxThen, finally add to your .tmux.conf
the following:
bind-key C-0 select-pane -t 0
restart tmux (make sure to close all sessions withtmux kill-session
). You should now be able to select pane number 0. To get the other 9 keys to work, repeat the above 5 steps with the appropriate escape sequences. They can be found in the link provided.
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