Search code examples
viyank

How to yank between vi editors, without quitting one?


I have opened two vi editors: vi file1 file2. Now file1 opens first, and i want to yank some lines from file1 and put it to file 2 without quitting file1, because more lines can be yanked, so it is just switching between vi's and yanking.

How to achieve it?


Solution

  • You can navigate between two multiple open files with :next and :previous (the file has to be saved, it wont allow switching then the current file is "modified").