My problem is I can't make
tmux key bindings to switch windows.
tmux terminal multiplexer on the FreeBSD server.
tmux is started automatically for all remote logins using
if [ $TERM = "xterm" ]; then ( (tmux has-session -t remote && tmux attach-session -t remote) \ || (tmux new-session -s remote) ) && exit 0 echo "tmux failed to start" fi
tmux windows are switched using Ctrl+B 1, Ctrl+B 2 ...
I want to switch
tmux windows using F1, F2 ...
So I added the following lines to
bind-key -n F1 select-window -t :1 bind-key -n F2 select-window -t :2 bind-key -n F3 select-window -t :3 bind-key -n F4 select-window -t :4 bind-key -n F5 select-window -t :5 bind-key -n F6 select-window -t :6 bind-key -n F7 select-window -t :7 bind-key -n F8 select-window -t :8 bind-key -n F9 select-window -t :9
Now when I login and press F1,
tmux says: "Window not found: :1".
I've tried to change to
bind-key -n F1 select-window -t remote:1, the error message is similar: "Window not found: remote:1".
Switching windows from command line works, both
tmux select-window -t :1 and
tmux select-window -t remote:1.
How can I make it work as a key binding?