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 :Sex.
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 file2.txt, then 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,]).
file1.txtandfile2.txtusing one instance? E.g.vim file1.txt file2.txt? – kenorb Feb 20 '15 at 12:30tmux, you can start "copy mode" withprefix+[, thenspaceto select stuff,Enterto copy, then go to the other pane, and useprefix+]to paste ... It's very similar to Vim's visual mode. IIRCscreen` can do this as well (but I don't remember how, as I haven't used it in years and years). – Martin Tournoij Feb 20 '15 at 13:21cat file1.txtand copy the content and paste the content to file2.txt? – dexhunter Dec 25 '17 at 10:47:set mouse=to prevent vim from taking over the mouse, allowing you to use the system clipboard. – Steen Schütt Apr 25 '19 at 21:47