For example, when I yank some text from vim, then :wq
, and open a new file. When I try to paste the text I just yanked, it doesn't work. So how to yank text between files?
use "+y
to send the yanked text to the clipboard, and "+p
to paste it into the new file.
So if I have a file named A that contains abcdef
and I (in visual mode) select def
and then press "+y
while in normal mode. I have just copied def
to the system clipboard. Now I can open up a file named B and (while in normal mode) press "+p
the text def
will be pasted into file B.