I want to copy text from visual mode into system (Ubuntu) clipboard. When I do ggVG
to select everything in Vim, I can't seem to copy that into system clipboard.
Now I read several options on how to do this, but none of them works. For example this does not work:
"+y
or "+
or "*yy
Why is it not working?
When using Vim under Windows, the clipboard can be accessed with the following: In step 4, press Shift+Delete to cut or Ctrl+Insert to copy. In step 6, press Shift+Insert to paste.
You are probably using the default Vim. It's a lightweight build that lacks a number of features including clipboard support.
You can verify that with this command:
:echo has('clipboard')
O
(zero) means "no clipboard support".
The simplest way to get clipboard support is to install a proper build:
$ sudo apt-get install vim-gnome
Then, you'll be able to do "+y
and "+p
.
See :help 'clipboard'
for a way to synchronize Vim's unnamed register and your system clipboard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With