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.

2

2 Answers 2

0

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

1
  • No modern Macintosh keyboard includes an Insert key...
    – mitjak
    Aug 16, 2012 at 20:09
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?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .