Vim on Ubuntu Server from OSX Terminal: automatic copy does not work

0

The Story

I'm using vim on a Ubuntu server to develop a webpage. Most of the time I work from a Windows machine using putty. Whenever I have to copy something from vim to the Windows clipboard I just select it while holding shift (shift is necessary when using set mouse=a in .vimrc).

The Problem

Sometimes I have to use an OSX machine. Well, no problem: Using the OSX terminal I ssh to my Ubuntu server and vim as I do using putty. The problem is: As soon as I set mouse=a it is no longer possible to easily copy content to the OSX clipboard. As long as mousa=a is not set, I can just copy content by selecting it.

The Request

Does anyone know how to easily copy something from vim to the OSX clipboard if the "set mouse=a" line is in .vimrc?

Thank you.

/edit:

The Solution

in .vimrc

set mouse=a
set term=xterm

Then it is possible to copy from vim in iTerm if I press "Alt" while selecting the content I want to copy.

SirSiggi

Posted 2011-10-05T06:57:51.727

Reputation: 99

Maybe I'm doing it wrong, but that does not work in my case. I've also tried that before. – None – 2011-10-05T07:20:14.633

Answers

0

Select the text you want, then hit Ctrl-insert to copy and Shift-insert to paste.

regality

Posted 2011-10-05T06:57:51.727

Reputation:

No modern Macintosh keyboard includes an Insert key... – mitjak – 2012-08-16T20:09:51.233

0

Do you copy using mouse selection then CmdC?

Doing that in plain vanilla Terminal.app works as intended here with more or less the same setup (running Vim with set mouse=a on a Ubuntu server via SSH in Terminal.app on MacOS X 10.6.7).

But I have installed MouseTerm some months ago and the copy using mouse selection then CmdC business doesn't work when it's activated. As soon as I uncheck the "Left Click" box, copying the selected text with CmdC works.

Do you have Mouseterm installed?

romainl

Posted 2011-10-05T06:57:51.727

Reputation: 19 227