I have the following in my .tmux.conf
set -g prefix M-j
bind-key j send-prefix
I need to press (Atl+J) + (J) + bound-key to send something to the nested tmux session. I feel it is rather slow. Is there any better way? For example, I would love to be able to do (Alt+J) + (2x bound-key) to do stuff in the nested session. I constantly execute commands in the top tmux session instead of executing them in the nested one.
Also, how come everybody binds prefix
to C-a
? I find it awfully slow and unpleasant to type this combination. Am I missing something?
Best Answer
It is one less keypress to send a command to your nested session if you choose a different key. I use Ctrlt for my standard prefix, and Ctrla for nested sessions.
Note that I use the
-n
switch. From the bind-key entry inman tmux
:So, as an example, Ctrlt, c opens a new window in tmux; Ctrla, c does the same in the nested session.