Open another file while others are already open

Say you have some files in the current directory: file1.txt, file2.txt, file3.txt

You've already opened the first file with vi and you want to open the other two at the same time. Just do the following while inside vi.

:e file2.txt

That will bring the second file into the buffer. Just execute :e file3.txt and now you will have all 3 files opened without ever closing vi.

To switch between the three files, enter the following command where # is an integer. 1 for file1.txt, 2 for file2.txt and 3 for file3.txt

I believe if you actually type :b# it will go to the next or previous file. I'm not sure.

It's sort of like having virtual tabs inside of vi.

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.