Copying from Vim Visual Mode to the System Clipboard

I want to copy text from visual mode to the clipboard (Ubuntu). When I do ggVGto select everything in Vim, I cannot copy it to the system clipboard.

Now I read a few options on how to do this, but none of them work. For example, this does not work: "+yor "+or"*yy

Why doesn't it work?

+4
source share
1 answer

You are probably using standard Vim. This is 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."

- :

$ sudo apt-get install vim-gnome

"+y "+p.

:help 'clipboard' Vim .

+6

Source: https://habr.com/ru/post/1545539/


All Articles