HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)
v
vi(1) vi(1)
W Move forward to the beginning of a word in the current line, where a word is a sequence
of nonblank characters. If the current position is at the beginning of a word, the current
position is within a bigword or the character at that position cannot be a part of a big-
word, the current position shall move to the first character of the next bigword. If no sub-
sequent bigword exists on the current line, the current position shall move to the first
character of the first bigword on the first following line that contains the bigword. For
this command, an empty or blank line is considered to contain exactly one bigword. The
current line is set to the line containing the bigword selected and the current position is
set to the first character of the bigword selected. A preceding count specifies the number
of words to advance.
X Delete the character before the cursor. A preceding count repeats the effect, but only
characters on the current line are deleted.
Y Place (yank) a copy of the current line into the unnamed buffer (same as
yy). If a count
is specified, count lines are copied to the buffer. If the
Y is preceded by a buffer name,
the lines are copied to the named buffer.
ZZ Exit the editor, writing out the buffer if it was changed since the last write (same as the
ex command x). Note that if the last write was to a different file and no changes have
occurred since, the editor exits without writing out the buffer.
a Enter input mode, appending the entered text after the current cursor position. A
preceding count causes the inserted text to be replicated the specified number of times,
but only if the inserted text is all on one line.
b Back up to the previous beginning of a word in the current line. A word is a sequence of
alphanumerics or a sequence of special characters. A preceding count repeats the effect.
c Must be followed by a movement command. Delete the specified region of text, and enter
input mode to replace deleted text with new text. If more than part of a single line is
affected, the deleted text is saved in the numeric buffers. If only part of the current line
is affected, the last character deleted is marked with a $. A preceding count passes that
value through to the move command. If the command is
cc, the entire current line is
changed.
d Must be followed by a movement command. Delete the specified region of text. If more
than part of a line is affected, the text is saved in the numeric buffers. A preceding count
passes that value through to the move command. If the command is
dd, the entire
current line is deleted.
e Move forward to the end of the next word, defined as for b
. A preceding count repeats
the effect.
f Must be followed by a single character; scan the rest of the current line for that charac-
ter, and moves the cursor to it if found. A preceding count repeats the action that many
times.
h Move the cursor one character to the left (same as ˆH). A preceding count repeats the
effect.
i Enter input mode, inserting the entered text before the cursor (see a).
j Move the cursor one line down in the same column (same as ˆJ and ˆN).
k Move the cursor one line up (same as ˆP).
l Move the cursor one character to the right (same as <space>).
mx Mark the current position of the cursor. x is a lowercase letter, a−z, that is used with
the ‘ and ’ commands to refer to the marked line or line position.
n Repeat the last / or ? scanning commands.
o Open a line below the current line and enter input mode; otherwise like O.
p Put text after/below the cursor; otherwise like P.
r Must be followed by a single character; the character under the cursor is replaced by the
specified one. (The new character can be a new-line.) If r is preceded by a count, count
characters are replaced by the specified character.
Section 1−−1044 Hewlett-Packard Company − 7 − HP-UX 11i Version 1: September 2005