First, save your current work in paint. Type :w and press Return.
Make editing changes to orwell and save your work.
When you are finished working with orwell and have saved your work, you have three choices:
To edit a series of files, list the file names after the vi command when you start vi from the command prompt:
$ vi paint orwell
The files appear in the order in which they are listed. First paint appears. When you finish editing paint, type :n to go on to the next file, orwell. To go on to the next file without saving changes in the current file, type :n! instead of :n.
If you have a series of files with related names (for example, test1, test2, test3), you can use wildcard characters to specify a group of files:
$ vi test*
The files will appear for editing in alphabetical order by name.
Edit the first file.
Without exiting vi, edit the next file (orwell in this example):