vi

vi is Unix's omnipresent, ubiquitous, cryptic command-line text editor.

There are two vi modes: Command mode and Insert mode. Table A.5 shows the commands that invoke Insert mode. Once you are in Insert mode, you get back to Command mode by pressing the Escape key.

vi Insert Commands
Insert CommandMeaning
aAppend after the cursor
AAppend at the end of the line
cBegin change operation
CChange to the end of the line
iInsert before the cursor
IInsert at the beginning of the line
oStart a blank line below the current line
OStart a blank line above the current line
RBegin overwriting text
sSubstitute a character
SSubstitute entire line

The normal cursor keys are not used to move around in vi. Table A.6 shows some vi movement commands.

Some vi Movement Commands ...

Get Red Hat Linux 6: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.