Copy and paste content from one file to another file in vi

I am working with two files, and I need to copy a few lines from one file and paste into another file. I know how to copy (yy) and paste (p) in the same file. But that doesn’t work for different files. How is this done?

Also, is there a way to cut-paste? I have tried googling, but most of the resources only talk about copy-paste.

19 Answers
19

Leave a Comment