Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
This section provides a review of the following:
vi modes
Syntax of vi commands
Status-line commands
Once the file is opened, you are in command mode. From command mode, you can:
Invoke insert mode
Issue editing commands
Move the cursor to a different position in the file
Invoke ex commands
Invoke a Unix shell
Save the current version of the file
Exit vi
In insert mode, you can enter new text in the file. You normally enter
insert mode with the i command.
Press the ESC key to exit insert
mode and return to command mode. The full list of commands that
enter insert mode is provided later in the section Insert Commands.