I think your ~/.tmux.conf file contains lines like below:
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
These lines bind Alt-h(j,k,l) to switch pane without need of prefix key.
But it seems that ESC+h(j,k,l) will also trigger the Alt-h(j,k,l). I don't know why either.
My way to fix it:
- Make sure you have closed the tmux session. ( use "prefix+&+y" to kill all window)
Change the key binding above in .tmux.conf to the new one below:
bind -n C-j select-pane -D \; display-panes
bind -n C-k select-pane -U \; display-panes
bind -n C-h select-pane -L \; display-panes
bind -n C-l select-pane -R \; display-panes
Restart your tmux. This will remove your previous M-(h,j,k,l) binding, and the new binding will take effect.
The meaning of the new binding is to: Use Ctrl-vim keys without prefix key to switch pane, and at the same time, show the pane indicator: the current active pane index's color will be red.