4

I want to set up iTerm2 to pass scroll events to tmux, so I can trivially enter (and exit) scrollback mode for whatever pane is active. Is this possible to do with iTerm2, or automation of some sort, or ...?

1

2 Answers 2

9

The mode is referred to as "copy mode" and as long as you're running tmux 1.5 or higher you can add:

setw -g mode-mouse on

to your ~/.tmux.conf file and tmux will automatically enter and exit copy mode when you use the scroll wheel on your mouse.

As a bonus, this option allows you to select the tmux pane with your mouse:

set -g mouse-select-pane on
7

As seen in this related issue: https://stackoverflow.com/questions/11832199/tmux-set-g-mouse-mode-on-doesnt-work

The command to enable scrolling & easy copy to clipboard highlighting is the following:

set -g mouse on

You must log in to answer this question.

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