HP-UX Reference (11i v2 07/12) - 1 User Commands N-Z (vol 2)
v
vi(1) vi(1)
When entering a command on the bottom line of the screen (
ex command line or search
pattern with
\ or ?), terminate input and execute command.
On many terminals, ˆ[ can be entered by pressing the ESC or ESCAPE key.
^\ Exit vi and enter ex command mode. If in input mode, terminate the input first.
^] Take the word at or after the cursor as a tag and execute the
tagMbobC editor com-
mand (see ex(1)).
^ˆ Return to the previous file (equivalent to
:ex #).
space Move one space to the right (stops at the end of the line). A preceding count specifies the
number of spaces to go forward (same as
l).
erase Erase, where erase is the user-designated erase character (see stty(1)). Same as
ˆH.
kill Kill, where kill is the user-designated kill character (see stty(1)). In input mode, kill
backs up to the beginning of the current input line without erasing the line from the
screen display.
susp Suspend the editor session and return to the calling shell, where susp is the user-
designated process-control suspend character (see stty(1)). See ex(1) for more informa-
tion on the
suspend editor command.
! An operator that passes specified lines from the buffer as standard input to the specified
system command, and replaces those lines with the standard output from the command.
The
! is followed by a movement command specifying the lines to be passed (lines from
the current position to the end of the movement) and then the command (terminated as
usual by a return). A preceding count is passed on to the movement command after !
.
Doubling
! and preceding it by count causes that many lines, starting with the current
line, to be passed.
" Use to precede a named buffer specification. There are named buffers
1 through 9 in
which the editor places deleted text. The named buffers
a through z are available to the
user for saving deleted or yanked text; see also
y, below.
$ Move to the end of the current line. A preceding count specifies the number of lines to
advance (for example, 2$ causes the cursor to advance to the end of the next line).
% Move to the parenthesis or brace that matches the parenthesis or brace at the current
cursor position.
& Same as the ex command & (that is, & repeats the previous substitute command).
’ When followed by a ’, vi returns to the previous context, placing the cursor at the
beginning of the line. (The previous context is set whenever a nonrelative move is made.)
When followed by a letter a-z, returns to the line marked with that letter (see the
m
command), at the first nonwhitespace character in the line.
When used with an operator such as d to specify an extent of text, the operation takes
place over complete lines (see also ‘).
‘ When followed by a ‘, vi returns to the previous context, placing the cursor at the char-
acter position marked (the previous context is set whenever a nonrelative move is made).
When followed by a letter az, returns to the line marked with that letter (see the m com-
mand), at the character position marked.
When used with an operator such as d to specify an extent of text, the operation takes
place from the exact marked place to the current position within the line (see also ’).
[[ Back up to the previous section boundary. A section is defined by the value of the sec-
tions
option. Lines that start with a form feed (ˆL)or{ also stop [[.
If the option lisp is set, the cursor stops at each ( at the beginning of a line.
]] Move forward to a section boundary (see [[).
^ Move to the first nonwhitespace position on the current line.
( Move backward to the beginning of a sentence. A sentence ends at a ., !,or? followed
by either the end of a line or by two spaces. Any number of closing ), ], ", and ’ char-
acters can appear between the ., !,or? and the spaces or end of line. If a count is
HP-UX 11i Version 2: December 2007 Update − 4 − Hewlett-Packard Company 413