Next: Cursor movement commands
Up: Quick Vi Tutorial
Previous: Quick Vi Tutorial
To invoke vi, simply type the letters vi followed by the name
of the file you wish to create. You will see a screen with
a column of tildes (SPMquot ") along the left side. vi is now in
command mode. Anything you type will be understood as a command, not
as text to be input. In order to input text, you must type a command.
The two basic input commands are the following:
i insert text to the left of the cursor
a append text to the right of the cursor
Since you are at the beginning of an empty file, it doesn't matter
which of these you type. Type one of them, and then type in the
following text (a poem by Augustus DeMorgan found in The Unix Programming
Environment by B.W. Kernighan and R. Pike):
Great fleas have little fleas<Enter>
upon their backs to bite 'em,<Enter>
And little fleas have lesser fleas<Enter>
and so ad infinitum.<Enter>
And the great fleas themselves, in turn,<Enter>
have greater fleas to go on;<Enter>
While these again have greater still,<Enter>
and greater still, and so on.<Enter>
<Esc>
Note that you press the key to end insertion and return
to command mode.
Converted on:
Mon Apr 1 08:59:56 EST 1996
|