【问题标题】:mouse wheel isn't scrolling in tmux鼠标滚轮不在 tmux 中滚动
【发布时间】:2012-06-07 17:16:53
【问题描述】:

它在 vim 中滚动正常,但在 tmux 中滚动。

我遵循了诸如添加之类的建议

set -g history-limit 1000
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
setw -g mode-mouse on
set-window-option -g mode-mouse on

.tmux.conf,但他们都没有帮助

我得到的只是历史命令滚动。

【问题讨论】:

  • 您在 shell 提示符下发出命令,因此 set 很可能被理解为 bash 的内置函数(参见帮助集),而 setw 不存在,因此您的系统会尝试建议它知道的最接近的匹配. set 和 setw(set-window-option 的简写)是 tmux 的命令,您可以在 tmux 的命令提示符下使用它们,由 ctrl-B 提示,或者作为 tmux 命令本身的参数,如“tmux setw -g mode-mouse开”

标签: scroll ubuntu-11.10 tmux


【解决方案1】:
set -g mouse on

如果它在你的 ~/.tmux.conf 中,就像这样

【讨论】:

    【解决方案2】:

    只是将两个相关的答案联系在一起:

    为什么tmux set -g mouse-mode on 不再起作用?

    正如in this answer 所指出的,该选项自 tmux 2.1 版 起已重命名为:

    tmux set -g mouse on
    

    要查找本地 tmux 版本,只需运行 tmux -V

    【讨论】:

      【解决方案3】:

      正确的命令是:

      set -g mode-mouse on
      

      你也可以将它添加到你的 ~/.tmux.conf

      【讨论】:

      • 您需要在 tmux 命令提示符下输入它(输入 CTRL-b 和 :).. 阅读手册。
      • 当我这样做时,我只会在提示符处出现乱码(任何终端提示符,例如 bash 提示符或 IPython 提示符等)模式鼠标还需要发生什么才能进行幼稚滚动?
      • 对我来说只是set -g mouse on。 (版本2.1-1
      • tmux wiki 中所述,> 这会干扰选择缓冲区的复制和粘贴。要复制/粘贴到/从选择缓冲区按住 shift 键。
      • 这不适用于新的 tmux 版本,因此应使用正确的信息进行更新或将其作为正确答案删除。
      猜你喜欢
      • 1970-01-01
      • 2013-04-20
      • 2011-12-09
      • 1970-01-01
      • 2011-09-29
      • 1970-01-01
      • 1970-01-01
      • 2015-06-16
      • 2017-02-27
      相关资源
      最近更新 更多