S
S
szafranji2020-05-11 01:49:04
vim
szafranji, 2020-05-11 01:49:04

How to copy in vim to the system clipboard?

Hello. System: Ubuntu 18.04.
I want to copy the text in vim to the system clipboard. I use the keyboard shortcut "+y or "*y, but for some reason it does not copy. Maybe a problem with setting up the sys.buffer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SilentFl, 2020-05-14
@szafranji

execute in vim :echo has('clipboard')- if it displays 0, then you need to install vim-gtk or vim-gnome.
Also, on Linux, "*y copies to paste into the terminal (buffer will be empty in gui apps), and "+y for gui apps

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question