2

I know this has been asked about a hundred times, and I have looked through almost every answer, I'll get to the point:

"+y
"*y
set clipboard=unnamed
set clipboard=unnamedplus
set clipboard+=unnamed    
y
yy

all do not copy to my systems clipboard, which is basically what every answer says to do,

my vim --version says my -clipboard, pretty sure it needs to be +clipboard, but I cannot figure out how to change it. Any information would be great thanks.

2 Answers 2

9

You need to install a proper Vim, built with clipboard support. Since you didn't tell us what platform you are on I won't be very specific but here we go:

  • Mac OS X

    Download MacVim, it comes with a mvim script that you can use from your shell to run the GUI ($ mvim file) or the CLI ('$ mvim -v file'). You can also try Macports or, if you like shiny things, Homebrew if that's what floats your boat.

  • Linux

    Install the vim-gnome or vim-gtk package with your distribution's package manager.

  • Windows

    The default download on vim.org comes with clipboard support but it lags quite a lot. The Cream project provides reasonably up to date builds.

1
  • Thanks, worked on Arch-Linx with sudo pacman -S vim-gvim-gtk as where I was only doing sudo pacman -S vim
    – XCritics
    May 3, 2013 at 6:23
0

Before you copy, you should press v or V to get into visual mode, then press "+y.

I mapped <leader>y to "+y.

You must log in to answer this question.

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