How to enable scrolling in tmux panels with mouse wheel?
Origin Answer (deprecated)
Try this:
setw -g mode-mouse on
It can be used with the mouse-select-pane on
and mouse-select-window on
options.
Update
After tmux 2.1, mode-mouse
option is no longer available. You should now use:
set -g mouse on
to capture mouse event.
For Mac OSX 10.9
First Install SimpleSIMBL
Then Install MouseTerm
Add this to your ~/.tmux.conf
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-window-option -g mode-mouse on
For VIM Scrolling add this to your ~/.vimrc
set mouse=a
set ttymouse=xterm
Notes: see also: Scrolling inside Vim in Mac's Terminal
From https://blogs.oracle.com/samf/entry/smcup_rmcup_hate
In .tmux.conf:
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
where, for instance, mouse scrolling in vim in tmux scrolls vim, NOT tmux history. Very beneficial, and VERY different from history scrolling.
There are some changes for Tmux 2.1
Mouse-mode has been rewritten. There's now no longer options for:
- mouse-resize-pane
- mouse-select-pane
- mouse-select-window
- mode-mouse
Instead there is just one option: 'mouse' which turns on mouse support entirely.
So set -g mouse on
Update:
I have to use this script to make scrolling work again: https://github.com/NHDaly/tmux-scroll-copy-mode