Re:Bcvi - run vi over a 'back-channel'
by pyre on Saturday June 05, 2010 @01:15AM
(#1406409)
If you are running vim in a terminal, then try ":set mouse=a" and it will use the XTerm mouse extensions. Most terminals support this (gnome-terminal, xfce4-terminal, rxvt-unicode, xterm). I don't know about the level of support in Putty, Terminal.app or iTerm.app though.
[ Parent
| on HN ]
Works pretty well in PuTTY, but you lose your local mouse support since clicks/drags are now passed straight to the server rather than selecting/copying/pasting text from PuTTY to the Windows clipboard. It's a tradeoff between easier text manipulation in vim, vs easier text transfer between the PuTTY window and other local windows (and vice versa).
However, PuTTY only switches on XTerm mouse reporting when an app needs it, so it should be easy enough to bind ":set mouse=a"/":set mouse-=a" to a hot key, and toggle mouse support on and off depending on the required operation.