DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Editing files

Entering text

You must be in command mode before you can issue a command to enter text; while you are entering text, you cannot issue any command except <Esc> to return to command mode. If you would like a visible reminder when you are in insertion mode, enter the command :set showmode (see ``Configuring vi'' for more details). The following commands put you in insertion mode to enter text:


a
Add text to the right of the cursor.

A
Add text to the end of a line.

i
Insert text to the left of the cursor.

I
Insert text at the start of a line.

o
Open a new line to put text below the current line.

Go
Go to end of the file and open a new line.

O
Open a new line above the current line.

1GO
Go to the first line in the file and enter new text above the line.
When you finish entering text, press <Esc> to return to command mode.

Taking the previous example, entering Go moves you to the end of the file and opens a new line. Pressing <Enter> adds a blank line. Typing ``by William Shakespeare'' and pressing <Esc> adds new text. The end of the file soliloquy now reads as follows:

   The fair Ophelia! - Nymph, in thy orisons
   Be all my sins remembered.
   

by William Shakespeare


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 22 April 2004