Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use vim inside terminal and trying to share the mac clipboard with vim.

Compiled vim with xterm_clipboard support and installed XQuartz.

MacBook-Air:web-ui nagakirank$ vim --version | grep xterm_clipboard
+xsmp_interact +xterm_clipboard -xterm_save

Nagas-MacBook-Air:web-ui nagakirank$ echo $DISPLAY

But,am not able to get Mac clipboard content inside vim using "+" register "+y.

Now,clueless on why it's not working..Need pointers on how to debug this?

share|improve this question
up vote 2 down vote accepted

Try building Vim 7.3 with the clipboard feature enabled. Starting in Vim 7.3, +clipboard uses the OS X pasteboard directly (via the * or + register, as you expected).

It probably is possible to use +xterm_clipboard with an X server configured to convert X’s selection to and from the OS X pasteboard, but it would probably be more problematic than the direct +clipboard solution.

As an example, the MacPorts build of the vim port that I have currently installed (vim @7.3.661_0+huge+perl+python27+ruby+tcl) has +clipboard, -xterm_clipboard, and can access the pasteboard through * and +.

Also, if you happen to be running Vim inside tmux you will probably need my wrapper program to reenable pasteboard access inside tmux sessions; this only applies to +clipboard access: X-mediated access might still work OK—as long as you keep DISPLAY updated—but still seems unnecessarily cumbersome to me.

share|improve this answer
It's working fine when vim launched outside screen and problem is only with vim inside screen. Went through your post and found that screen installed via Ports has the patches to fix this. Installed screen via Ports and that solved the issue..Thanks..Haven't expected I would be able to solve this easily – Naga Kiran Nov 28 '12 at 10:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.