The following will work only if vim --version
indicates that you have +xterm_clipboard
feature. If not, you will have to install extra packages or recompile vim with that feature added.
There are actually two options for this:
"+y
copies to the "usual" clipboard buffer (so you can paste using Ctrl+V, right click and select "Paste" etc), while
"*y
copies to the X11 selection - you can paste from this buffer using middle click.
Note that "*
and "+
work both ways. So if you have selected some text in another application, you can paste it into vim using "*p
and if you have copied some text (using, say, Ctrl-C) then you can paste it into vim using "+p
.
shift'
thenshift=
theny
(not all at once, one after the other, except the shifts of course). – Reid Mar 30 '17 at 18:39+clipboard
and-xterm_save
. How do I get the+xterm_clipboard
? – Jdeep Jul 22 '20 at 08:04