FINAL TRIM SIZE : 7.5 in x 9.0 in
4
Editing
Files
You
can
use
the
in
teractiv
e
text
editor
vi
to
enable
y
ou
to
view
and
alter
text
les,
as
w
ell
as
to
create
new
ones.
This
section in
tro duces
the basics
of using
vi
.F
or detailed
information, see
The Ultimate
Guide
to
the
vi
and
ex
T
ext
Editors
.
Starting
vi
Start
vi
by
en
tering
the
command
vi
lename
at
the
prompt.
If
a
le
called
lename
exists,
y
ou
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
Editing
Functions
The
vi
editor
has
sev
eral
functional
mo
des.
When
you
enter
vi
y
ou
are
in
command
mo
de
and
it
is
in
this
mo
de
that
y
ou
select
all
editing
functions.
Y
our selection
determines
what
y
ou
can
do
to
the
text.
Press
4
ESC
5
to
ensure
that
vi
is
in
command
mo
de.
Then
y
ou
can
execute
an
y
of
the
follo
wing
commands
(among
others):
i
(the
insert
command)
Places
y
our
le
in
text
mo
de
and
en
ters
whatev
er
you
typ
e
preceding
the
cursor.
Ev
erything
after
the
cursor
will
b
e
mo
v
ed to
the righ
t.
a
(the
app
end
command)
Places
y
our
le
in
text
mo
de
and
enters
whatever
you
typ
e
after
the
cursor.
The
cursor
mo
v
es
to
the
righ
t,
and
then
text
is inserted
as with
i
.
x
(the delete
command)
Deletes
the c
haracter that
is
highligh
ted
b
y
the
cursor.
This
command
do
es not
put y
our do
cument
in text
mo de.
Each command
in command mo de allows y
ou to p erform only that function.
For example, if y
ou place y
our le in text mode b
yt
yping
r
(\replace a single
character" command), then y
ou ma
y only replace one c
haracter. Y
ou are then
placed in command mo de, and y
ou can return to text mo de b
yt
yping
i
or
a
before inserting text.
4-14 Using the Command Line