Since you already know how to cut/yank text, here are a few ideas for pasting it back into another file:
- Edit the first file, yanking the text you want. Then open your second file from within vi (
:e /path/to/other/file
) and paste it -
Open 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
- From within the first file, Ctrl + w, s