Linux - How to edit multiple files vi editor, Accessing multiple files in vi editor

How to edit multiple files vi editor


If you are using gnome vim enhanced version supports gui version. But normally as a sever admin we work in terminal.

Open multiple files in a terminal using below command
 # vi file1 file2 file3 
Now from the above command vim/vi editor opens file1 on the terminal

You can switch over the files using :n command
 
 :n
Select escape mode and type :n to switch to different files
You can navigate between the three different files using :n and :N
 :N

To check the files which are open
 :buffers

  1      \"file1\"                   line 1
  2 %a   \"file2\"                   line 1
  3 #    \"file3\"                   line 1
To switch to first file
 :buffer 1

By using the buffer command, you can coppy files between multiple files and work efficiently using vi editor.

The topic on Linux - How to edit multiple files vi editor is posted by - Math

Hope you have enjoyed, Linux - How to edit multiple files vi editorThanks for your time

Tech Bluff