Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
vi(1) OSS Shell and Utilities Reference Manual
’x Moves the cursor to the beginning of the line marked x.
Adjusting the Screen
Enter the following subcommands in Command mode. An incomplete subcommand can be can-
celled by pressing <Esc>.
<Ctrl-l> Clears and redraws the screen.
<Ctrl-r> Redraws the screen and eliminates blank lines marked with a @.
z<Return>
Redraws the screen with the current line at the top of the screen.
z- Redraws the screen with the current line at the bottom of the screen.
z. Redraws the screen with the current line at the center of the screen.
/pattern/z-
Redraws the screen with the line containing pattern at the bottom.
znumber<Return>
Makes the window number lines long.
Adding Text to a File--Text Input Mode
The following subcommands are entered in Command mode and bring the vi editor into Text
Input mode to allow you to add text to your file. End Text Intput mode by pressing <Esc>.
atext Inserts text after the cursor.
Atext Adds text to the end of the line.
itext Inserts text before the cursor.
Itext Inserts text before the first nonspace character in the line.
o Adds an empty line below the current line.
O Adds an empty line above the current line.
Changing Text While in Input Mode
Use the following commands only while in Text Entry mode. They have different meanings in
Command mode.
<Ctrl-h>
Erases the last character.
<Ctrl-w>
Erases the last small word. (For more information about small words, see the section vi
Character Sets.)
\ Quotes the Erase and Kill characters.
<Esc> Ends insertion, sends the program back to Command mode.
Quit key sequence
Interrupts and terminates insert or <Ctrl-d>.
<Ctrl-d>
Goes back to the previous autoindent stop.
10−12 Hewlett-Packard Company 527188-003