In ideal situation it would be great if you could open two files under one instance:
vim file1.txt file2.txt
If not possible, then you can still do it if the files are accessible on the same host, by opening 1st file and:
- Copy text in
file1.txt (e.g. enter visual mode V, select the text, and yank/copy them by y).
Open 2nd file by
You may also use:
:e file2.txt, then if you need to use full path, go to 2nd instance and check by 1,Ctrl+g.
Paste your text (e.g. p).
Above steps can be done opposite, by opening
file1.txt to copy the text, back to the original file and paste it there.
Or simply use
screen buffer to copy and paste between screen windows (Ctrl+a,[ and Ctrl+a,]).