Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (v - z) vi(1)
5. % means all. To yank all lines:
%y
(The preceding command replaces 1,$y.)
argument
Specifies what to act on. This can be a text object (a character, word, sentence, para-
graph, section, or character string) or a text position (a line, position in the current line,
or screen position).
Moving Within a File
Enter the following subcommands in Command mode. You can cancel an incomplete subcom-
mand by pressing <Esc>.
<Left Arrow>, h, <Ctrl-h>
Moves the cursor one character to the left.
<Down Arrow>, j, <Ctrl-j>, <Ctrl-n>
Moves the cursor down one line, remaining in the same column.
<Up Arrow>, k, <Ctrl-p>
Moves the cursor up one line, remaining in the same column.
<Right Arrow>, l <Space>
Moves the cursor one character to the right.
Long lines: Lines over one screen width are wrapped but not broken. When using the
Up Arrow or Page Up key, @ lines are added at the bottom of the screen when too few
physical lines are available to display the complete line. The Down Arrow key moves
the entire line off the screen at once.
Character Positioning Within a Line
Enter the following subcommands in Command mode.
^ Moves the cursor to the first nonspace character.
0 Moves the cursor to the beginning of the line.
$ Moves the cursor to the end of the line.
fx Moves the cursor to the next x character.
Fx Moves the cursor to the previous x character.
tx Moves the cursor to one column before the next x character.
Tx Moves the cursor to one column after the previous x character.
; Repeats the last f, F, t,orT subcommand.
, Repeats the last f, F, t,orT subcommand in the opposite direction.
number<Space>
Moves the cursor to the specified column.
Moving to Words
Enter the following subcommands in Command mode.
w Moves the cursor forward to the beginning of a word.
527188-003 Hewlett-Packard Company 10−9