Novell LINUX ENTERPRISE SERVER 10 - INSTALLATION AND ADMINISTRATION 04-08-2006 Installation Manual page 374

Table of Contents

Advertisement

1.
2.
18.4.2 vi in Action
vi can be used as a normal editor. In insert mode, enter text and delete text with the
and
<—
However, these control keys often cause problems, because there are many terminal
types that use special key codes. This is where the command mode comes into play.
Press
cursor with
H
Move one character to the left
J
Move one line down
K
Move one line up
L
Move one character to the right
The commands in command mode allow diverse variations. To execute a command
several times, simply enter the number of repetitions before entering the actual command.
For example, enter
A selection of important commands is shown in
vi Editor"
in the documentation found in
374
Installation and Administration
Exit without saving: To terminate the editor without saving the changes, enter
in command mode. The exclamation mark (!) causes vi to ignore any
:
Q
!
changes.
Save and exit: There are several possibilities to save your changes and terminate
the editor. In command mode, use
saving all changes using the extended mode, enter
w stands for write and q for quit.
keys. Use the arrow keys to move the cursor.
Del
to switch from insert mode to command mode. In command mode, move the
Esc
,
,
, and
H
J
K
L
to move the cursor five characters to the right.
5 L
(page 375) This list is far from complete. More complete lists are available
+
Shift
. The keys have the following functions:
Table 18.2, "Simple Commands of the
Section 18.4.3, "For More Information"
+
. To exit the program
Z Shift
Z
. In extended mode,
:
W
Q
(page 376)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Suse linux enterprise server 10

Table of Contents