6.9.2 Copying Lines Between Files
To copy lines from one file to another, do the following:
Edit the first file.
Save the desired lines in named buffers, using the yank
command. For example, to save 10 lines in buffer a, type a10Y.
Without exiting vi, edit the next file (orwell in this example):
Add the lines from the first file with the put command.
For example, to put the contents of buffer a below the
current cursor position, type ap.
Remember that the contents of all named buffers are lost whenever you
exit vi. Don't use the quit (:q) command
until you have finished any operations involving named buffers.