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

杀马特。学长 韩版系。学妹 提交于 2019-12-03 00:51:22

问题


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?


回答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.




回答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




回答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.




回答4:


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



来源:https://stackoverflow.com/questions/7798103/how-to-enable-scrolling-in-tmux-panels-with-mouse-wheel

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!