Yank lines from one file in vi ( not vim ) to another?

meder omuraliev picture meder omuraliev · Sep 21, 2009 · Viewed 23.6k times · Source

I'm used to VIM and usually I split screen with and open another file, yank the text into the second one. However I'm dealing with a legacy server which only has vi, how could I either open multiple files with it if it doesn't support split views or copy text from one file to another ( 2 separate vim instances I guess ).

I don't think this server has 'screen' enabled and I have limited access so I can't just go installing things.

Answer

nothrow picture nothrow · Sep 21, 2009

open one file in Vi, yank text, then use

:e another_file

to open another file, and paste.