Technical data

Using a Text Editor
7-6
Performing Editing Functions
Once you start vi, you are either in command or text mode. Press the < ESC > key
to ensure that your file is in command mode so that can execute any of the following
commands:
The insert command:
Places your file in text mode and enters whatever you type preceding the cur-
sor. Everything after the cursor will be moved to the right.
The append command:
Places your file in text mode and enters whatever you type after the cursor.
Everything after the cursor will be moved to the right.
The delete command:
Deletes the character that is highlighted by the cursor. This command does not
put your document in text mode.
If the command expects you to type something after entering your command to
complete the operation, you are placed in text mode; otherwise, you remain in com-
mand mode.
Each command from command mode allows you to perform only that function
within text mode. For example, if you place your file in text mode via the append
command, then you may only perform append functions. Your file must be placed
in command mode and returned text mode via the insert command before you can
insert text.
Figure 7-3 shows the overall operation of vi.