29

I've reset my computer and now tmux is complaining about my .tmux.conf having these directives:

setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window off
set -g default-terminal "screen-256color"

with these errors:

/Users/mdurrant/.tmux.conf:24: unknown option: mode-mouse                  [0/0]
/Users/mdurrant/.tmux.conf:25: unknown option: mouse-select-pane
/Users/mdurrant/.tmux.conf:26: unknown option: mouse-resize-pane
/Users/mdurrant/.tmux.conf:27: unknown option: mouse-select-window

So I have to comment them out, but then my mouse doesn't work in tmux, which is a pain.

How can I enable the mouse in iTerm2 with tmux?

This works on my other Mac.

I use tmux version 2.1.

56

This looks like a change in tmux in 2.0 -> 2.1

I've replaced

setw -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window off

with just

set-option -g mouse on

and everything seems ok

  • 4
    mouse on configures the following: The default key bindings allow the mouse to be used to select and resize panes, to copy text and to change window using the status line., so it's the equivalent of setting mouse-select-pane, mouse-resize-pane and mouse-select-window as on. Probably close enough to the original configuration; though not exactly the same. – davidjb Aug 6 '16 at 7:05
  • All these years I was driving with the handbrake on. – PnotNP Jul 28 at 18:38
0

mode-mouse isn't support on tmux. Try use on ~/.tmux.conf

set -g mouse on

and run on terminal

tmux source-file ~/.tmux.conf

Work so good on my computer, it can scroll, change panes...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .