Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

User Commands (v - z) vi(1)
<Ctrl-b>
Pages backward one screen (defaults to value of window option).
<Ctrl-y>
Scrolls the window up one line.
<Ctrl-e> Scrolls the window down one line.
<Ctrl-m>
Moves to the rst nonwhite character in the next line. A count species the number of
lines to go forward.
<Ctrl-t> Inserts shiftwidth white space in input mode, if at the beginning of the line or preceded
only by white space. This inserted space can only be backed over using <Ctrl-d>.
<Ctrl-[> Cancels a partially formed command; sounds the bell if there is none.
In input mode, terminates input mode.
When entering a command on the bottom line of the screen (ex command line or search
pattern with \ or ?), terminates input and executes command.
z+ Pages up (defaults to value of window option).
zˆ Pages down (defaults to value of window option).
Searching for Patterns
The following commands allow you to search for patterns within a le. Patterns can be regular
expressions as described for grep.
/pattern Places the cursor at the next line containing pattern.
?pattern Places the cursor at the next previous line containing pattern.
n Repeats the last search for pattern in the same direction.
N Repeats the last search for pattern in the opposite direction.
/pattern/+number
Places the cursor at the numberth line after the line matching pattern.
?pattern?-number
Places the cursor at the numberth line before the line matching pattern.
% Finds the parenthesis or brace that matches the one at the current cursor position.
<Ctrl-t> Finds the word at the cursor in the tags le then edits the proper le, placing the cursor
at the tag. If the tag is in the current le, moves cursor to it.
Marking and Returning
Enter the following subcommands in Command mode. You can cancel an incomplete subcom-
mand by pressing <Esc>.
‘‘ Moves the cursor to the same cursor position of the previous current line.
’’ Moves the cursor to the beginning of the previous current line.
mx Marks the current position with the letter specied by x.
x Moves the cursor to the same cursor position of line marked x.
527188-003 Hewlett-Packard Company 1011