I'm trying to yank to the system clipboard on Ubuntu 14.04. I can't yank into the + or * registers, though. Every time I visually select my text and type "*y or "+y the indicator on the bottom right initially indicates the number of lines selected (e.g. 4) while in visual mode. After the next keystroke, ", it indicates that it is in operator pending mode (lists " instead of 4).
As soon as I press * the " changes back to the number of lines selected (4). Pressing y after this vim reports that 4 lines were yanked. But they are definitely not in the system clipboard. The exact same thing happens when I try to store the yank in the + register.
Notes:
- I have two keyboard layouts configured (Dvorak: primary, QWERTY: secondary). The same thing happens on both layouts.
- I have stripped down my
.vimrcto an empty file: No luck.
+clipboard? You can check that with the function:version(). More precisely you can use:echo has('clipboard')to check if this precise option is enabled. If it is not you'll have to recompile a vim with this option. – statox Jul 22 '15 at 05:03gvim -vand get a terminal vim, or you can link gvim to vim, e.g.,ln /usr/bin/gvim ~/bin/vimand make sure~/binis before/usr/binin your PATH. – garyjohn Jul 22 '15 at 16:07clipboardoption? – statox Jul 22 '15 at 18:07version()function, but it does have a:versioncommand. Is that a typo or is my:versionmissingversion()? – jjaderberg Jul 22 '15 at 19:24version()function only a:versioncommand. That was a typo, my bad. (Unfortunately I can't edit my comment anymore) – statox Jul 22 '15 at 19:28