如何在 tmux/vim 中启用鼠标支持,以便即使在 ssh 到远程主机后它也能继续工作

发布于 2025-01-02 06:17:45 字数 396 浏览 1 评论 0原文

我在一台 Windows 机器上,从我的 Linux 服务器远程显示了一个 xterm,我在其中运行了许多 tmux 会话。我已完成所有设置,以便我的鼠标可以在第一台服务器(tmux 会话所在的位置)上的 tmux 和 vim 中工作,但是当我 ssh 时> 到 tmux 会话中的第二个 Linux 服务器时,鼠标在 vim 中停止工作。有谁知道为什么会发生这种情况或者我该如何解决它?

我正在使用 tmux-1.5 和 vim 7.3。我的所有设置文件在 Linux 服务器之间都是相同的,因为我的主目录在它们之间进行了映射。

编辑: 经过更多研究后,似乎只有 vim 分割大小调整受到影响。我仍然可以设置光标位置或用鼠标选择文本。

I am on a windows machine with an xterm remotely displayed from my Linux server where I run many tmux sessions. I have everything setup so that my mouse works in both tmux and vim on that first server (where the tmux session resides), however when I ssh to a second Linux server within a tmux session the mouse stops working in vim. Does anyone have a clue to why this happens or how I can fix it?

I am using tmux-1.5 and vim 7.3. All my settings files are the same between the Linux servers since my home directory is mapped between them.

Edit:
After looking more into this it only seems that the vim split re-sizing is affected. I can still set the cursor position or select text with the mouse.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不羁少年 2025-01-09 06:17:45

我似乎已经解决了问题。看来是vim中的ttymouse设置。我将其设置为 xterm 并且 xterm2 似乎已经解决了问题。

I seemed to have solved the problem. It appears to be the ttymouse setting in vim. I had it set to xterm and xterm2 seems to have fixed the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文