DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
vi editing
«Prev
Unix Concepts
File Management
List Files Command
Copy Directories Command
Removing Directories Quickly
Unix About Links
Creating File Link
Find Command Search
File Management Conclusion
Unix Customization
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Customize-environment
Grep Regular Expression
Define Regex
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Regex Conclusion
Pattern Matching - Quiz
editing with vi
vi Review
Text in vi
Creating Text
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Switching between files within a vi session
By entering the UNIX command vi recipe quartet, you can edit both files within the same vi session
vi displays the first file, recipe
To go to the next file, enter the :n command.
Now you are in the quartet file, as confirmed by the status line.
If you try to use :n again, the message "No more files to edit." That is because quartet is the last file in the list, so there is no "next" file.
The :rew command starts the list over, rewinding to the first file. Rewinding is typically used with 3 or more files. In this case, with only two files, you also could enter :re#
After rewinding the list, vi reports that there are 2 files to edit and that you are currently in the recipe file.
Now use the :q command to quit vi.
Instead of quitting, vi report that there is "1 more file to edit". To really quit vi, you must enter :q a second time.