How to enable scrolling in tmux panels with mouse wheel? [closed]

Need to enable scrolling into tmux panels with mouse wheel. How can I get that tips? Can I use it (if its exist of course) with mouse-select-pane on option?


Solution 1:

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.

Solution 2:

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

Solution 3:

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.