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

v
vi(1) vi(1)
stream. Commands to be executed in ex mode should be preceded by a colon (
:).
~ The tilde (˜) switches the case of the character under the cursor (if it is a letter), then
moves one character to the right, stopping at the end of the line). A preceding count
specifies how many characters in the current line are switched.
A Append at the end of line (same as
$a).
B Back up one word, where a word is any nonblank sequence, placing the cursor at the
beginning of the word. If a count is specified, the cursor moves back the specified number
of words.
C Change the rest of the text on the current line (same as
c$).
D Delete the rest of the text on the current line (same as
d$).
E Move forward to the end of a word, where a word is any nonblank sequence. If a count is
specified, the cursor advances the specified number of words.
F Must be followed by a single character; scans backwards in the current line, searching for
that character and moving the cursor to it, if found. If a count is specified, the search is
repeated the specified number of times.
G Go to the line number given as preceding argument, or the end of the file if no preceding
count is given.
H Move the cursor to the top line on the screen. If a count is given, the cursor moves to
count number of lines from the top of the screen. The cursor is placed on the first
nonwhitespace character on the line. If used as the target of an operator, entire lines are
affected.
I Insert at the beginning of a line (same as ˆ followed by i).
J Join the current line with the next one, supplying appropriate whitespace: one space
between words, two spaces after a period, and no spaces at all if the first character of the
next line is a closing parenthesis ()). A preceding count causes the specified number of
lines to be joined, instead of just two.
L Move the cursor to the first nonwhitespace character of the last line on the screen. If a
count is given, the cursor moves to count number of lines from the bottom of the screen.
When used with an operator, entire lines are affected.
M Move the cursor to the middle line on the screen, at the first nonwhitespace position on
the line.
N Scan for the next match of the last pattern given to / or ?, but in the opposite direction;
this is the reverse of
n.
O Open a new line above the current line and enter input mode.
P Put back (replace) the last deleted or yanked text before/above the cursor. Entire lines of
text are returned above the cursor if entire lines were deleted or yanked. Otherwise, the
text is inserted just before the cursor.
(XPG4 only.) In this case, the cursor is moved to last column position of the inserted
characters.
If
P is preceded by a named buffer specification (x), the contents of that buffer are
retrieved instead.
Q Exit vi and enter ex command mode.
R Replace characters on the screen with characters entered, until the input is terminated
with ESC.
S Change entire lines (same as cc). A preceding count changes the specified number of
lines.
T Must be followed by a single character; scan backwards in the current line for that char-
acter, and, if found, place the cursor just after that character. A count is equivalent to
repeating the search the specified number of times.
U Restore the current line to its state before the cursor was last moved to it.
HP-UX 11i Version 2: December 2007 Update 6 Hewlett-Packard Company 415