Here is yet another Vi editor trick. At the Vi editor, we can edit multiple files by switching between them (With out opening another terminal)
$vi ex1.c ex2.c ex3.c
To switch one file to another use :n, :#e (With out exiting and opening the file)
like $vi ex1.c ex2.c ex3.c
:n Move forward to next file is the file list
:e# Toggle between the last two edited files
:rew Rewind file list and reopen first file in the list
$vi ex1.c ex2.c ex3.c
To switch one file to another use :n, :#e (With out exiting and opening the file)
like $vi ex1.c ex2.c ex3.c
:n Move forward to next file is the file list
:e# Toggle between the last two edited files
:rew Rewind file list and reopen first file in the list
Comments