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.
Since you already know how to cut/yank text, here are a few ideas for pasting it back into another file:
:e /path/to/other/file
) and paste itOpen both files together in a split window and navigate between them using Ctrl + w, Up/Down either by:
vi -o /path/to/file1 /path/to/file2