I have put
set -g mouse on
set -g mouse-select-pane on
in my .tmux.conf file and then I open tmux and create a new pane and I cant switch pane with mouse. is there something else I need to configure? I am using tmux 2.9 on Mac using zsh.
I have put
set -g mouse on
set -g mouse-select-pane on
in my .tmux.conf file and then I open tmux and create a new pane and I cant switch pane with mouse. is there something else I need to configure? I am using tmux 2.9 on Mac using zsh.
Here is a clarification of Mark Volkmann's answer. First make sure that you have set -g mouse on
in your .tmux.conf
file, and that you have sourced the file by running tmux source <whatever config file>
. I have found the other line you have in your config to be unnecessary. Once you have the config file set up, run:
$ exit tmux
$ tmux kill-server
$ tmux
NOTE: In a previous version of this answer I listed Volkmann's answer as "horrible and unreadable". I do not find this to be correct nor do I find it an acceptable way to treat another person. Please accept my apology for being rude and inconsiderate.
I had the same issue. It was fixed after I did the following:
exit tmux
tmux kill-server
tmux
againOn higher version 2.1 >, use :
setw -g mouse on
mouse-select-pane
is removed since 2.1
https://stackoverflow.com/questions/11832199/tmux-set-g-mouse-mode-on-not-scrolling/33336609#33336609
– n0099
Mar 04 '24 at 06:00
After making the tmux config change, run tmux source ~/.tmux.conf
for an "on-the-fly" change
# Toggle mouse with ^M; then report it's new status
bind-key C-m set-option -g mouse \; display-message 'Mouse #{?mouse,on,off}'
To obtain the default behavior, which is equal as UP and DOWN keyboard arrows, use:
echo "set -g terminal-overrides 'xterm*:smcup@:rmcup@'" >> ~/.tmux.conf && tmux kill-server && tmux