Is it possible? Every solution I've found online somehow doesn't meet one of the following criteria:

  • vim, no macvim
  • osx only
  • visual mode only (for copying at least)
  • must be able to copy only selection, and not entire line
  • must copy to system clipboard

2 Answers 2


There is special "*" register, witch reference system clipboard. "*y "*p It should work on console vim on every OS (I use vim on Windows).


The default Vim that comes with Mac OS X is not built with clipboard support. It is possible to use pbpaste and pbcopy as a workaround but not very practical.

A much better long-term solution is to…

  1. download MacVim,

  2. put MacVim.app in /Applications/ or ~/Applications/,

  3. put mvim in one of the directories listed in $ echo $PATH,

  4. do $ mvim -v filename to edit filename with MacVim's CLI executable,

  5. use "+y to yank to and "+p to put from the system clipboard.

You must log in to answer this question.

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