HP-UX Reference (11i v2 03/08) - 1 User Commands N-Z (vol 2)

v
vi(1) vi(1)
s Delete the single character under the cursor and enter input mode; the entered text
replaces the deleted character. A preceding count specifies how many characters on
the current line are changed. The last character being changed is marked with a
$,as
for
c.
t Must be followed by a single character; scan the remainder of the line for that charac-
ter. The cursor moves to the column prior to the character if the character is found. A
preceding count is equivalent to repeating the search count times.
u Reverse the last change made to the current buffer. If repeated,
u alternates between
these two states; thus is its own inverse. When used after an insertion of text on more
than one line, the lines are saved in the numerically named buffers.
w Move forward to the beginning of the next word (where word is defined as in
b). A
preceding count specifies how many words the cursor advances.
x Delete the single character under the cursor. When
x is preceded by a count, x deletes
the specified number of characters forward from the cursor position, but only on the
current line.
y Must be followed by a movement command; the specified text is copied (yanked) into
the unnamed temporary buffer. If preceded by a named buffer specification,
"x, the
text is placed in that buffer also. If the command is
yy, the entire current line is
yanked.
z Redraw the screen with the current line placed as specified by the following options:
z<return> specifies the top of the screen, z. the center of the screen, and
z- the bot-
tom of the screen. The commands
and z+ are similar to ˆB and ˆF, respectively.
However, and z+ do not attempt to maintain two lines of overlap. A count after the
z and before the following character to specifies the number of lines displayed in the
redrawn screen. A count before the z gives the number of the line to use as the refer-
ence line instead of the default current line.
Keyboard Editing Keys
At initialization, the editor automatically maps some terminal keyboard editing keys to equivalent visual
mode commands. These mappings are only established for keys that are listed in the following table and
defined in the terminfo (4) database as valid for the current terminal (as specified by the
TERM environ-
ment variable).
Both command and input mode mappings are created (see the
map command in ex(1)). With the excep-
tion of the insert char keys, which simply toggle input mode on and off, the input mode mappings
exit input mode, perform the same action as the command mode mapping, and then reenter input mode.
On certain terminals, the character sequence sent by a keyboard editing key, which is then mapped to a
visual mode command, can be the same character sequence a user might enter to perform another com-
mand or set of commands. This is most likely to happen with the input mode mappings; therefore, on
these terminals, the input mode mappings are disabled by default. Users can override the disabling and
enabling of both the command and input mode keyboard editing key mappings by setting the
keyboar-
dedit and keyboardedit! editor options as appropriate (see ex(1)). The timeout, timeoutlen,
and doubleescape editor options are alternative methods of addressing this problem.
Section 1952 Hewlett-Packard Company 8 HP-UX 11i Version 2: August 2003