为了允许用鼠标滚动tmux窗格,我在~/.tmux.conf文件中放入了以下内容:
set -g mouse-mode on
然而,什么都没有改变。当我滚动时,它仍然在tmux之外滚动。为什么会这样?
为了允许用鼠标滚动tmux窗格,我在~/.tmux.conf文件中放入了以下内容:
set -g mouse-mode on
然而,什么都没有改变。当我滚动时,它仍然在tmux之外滚动。为什么会这样?
当前回答
这应该可以工作:
setw -g mode-mouse on
然后资源,然后配置文件
tmux source-file ~/.tmux.conf
或者关闭服务器
其他回答
Ctrl + B,然后设置鼠标。-g不再需要。
粘贴到~/.tmux.conf
set -g mouse on
在终端上运行
tmux source-file ~/.tmux.conf
这应该可以工作:
setw -g mode-mouse on
然后资源,然后配置文件
tmux source-file ~/.tmux.conf
或者关闭服务器
给那些现在正失去理智的人一个快速提醒:
https://github.com/tmux/tmux/blob/310f0a960ca64fa3809545badc629c0c166c6cd2/CHANGES#L12
这就是
:setw -g mouse
因此该选项已在2.1版本中重命名(2015年10月18日)
更新日志如下:
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
这就是我现在在.tmux.conf文件中使用的
set -g mouse on