Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable mouse support in tmux/vim so it continues to work even after a ssh to a remote host

Tags:

vim

tmux

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.

like image 405
Neg_EV Avatar asked Dec 28 '22 06:12

Neg_EV


1 Answers

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.

like image 175
Neg_EV Avatar answered Apr 28 '23 08:04

Neg_EV