FINAL TRIM SIZE : 7.0 in x 8.5 in
4
Editing Files
You can use the HP VUE T
ext Editor (see
HP VUE User's Guide
) or the
HP-UX interactive text editor
vi
to view and edit text les, as w
ell as to
create new ones. The
vi
editor is the default for the Elm mailer, command line
editing, and for some HP VUE functions. This section in
tro duces the basics of
using
vi
.For detailed information, see
The Ultimate Guide to the vi and ex
Text Editors
.
Starting vi
Start
vi
byentering the command
vi
lename
at the prompt. If a le called
lename
exists, you will see the rst screen of that le. If the le do es not
exist, it is created, and you will see a blank screen.
Selecting vi Editing Functions
The
vi
editor has several functional modes. When you enter
vi
you are in
command mo de
and it is in this mo de that you select all editing functions.
Your selection determines what you can do to the text.
Press
4
ESC
5
to ensure that
vi
is in command mo de. Then you can execute any
of the following commands (among others):
i
(the insert
command)
Places your le in text mo de and enters whatever you type
preceding the cursor. Everything after the cursor will b e
moved to the right.
a
(the append
command)
Places your le in text mo de and en
ters whatever you type
after the cursor. The cursor moves to the right, and then text
is inserted as with
i
.
x
(the delete
command)
Deletes the character that is highlighted by the cursor. This
command do es not put your do cument in text mo de.
Each command in command mo de allows you to perform only that function.
For example, if you place your le in text mode bytyping
r
(\replace a single
character" command), then you may only replace one character. You are then
placed in command mo de, and you can return to text mo de bytyping
i
or
a
before inserting text.
4-14 Using the Command Line DRAFT
2/5/97 11:31