home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

8.9 Alphabetical List of Keys

For brevity, control characters are marked by ^ .

^] Perform a tag look-up on the text under the cursor.
a Append text after cursor.
A Append text at end of line.
^A Unused.
b Back up to beginning of word in current line.
B Back up to beginning of word, ignoring punctuation.
^B Scroll backward one window.
c Change operator.
C Change to end of current line.

Unused in command mode; ends insert mode (stty interrupt character).

d Delete operator.
D Delete to end of current line.

Scroll down half-window (command mode).

Move backward one tab-stop (insert mode).

e Move to end of word.
E Move to end of word, ignoring punctuation.
^E Show one more line at bottom of window.
f Find next character typed forward on current line.
F Find next character typed backward on current line.
^F Scroll forward one window.
g Unused.
G Go to specified line or end of file.
^G Print information about file on status line.
h Left arrow cursor key.
H Move cursor to Home position.
^H Left arrow cursor key; Backspace key in insert mode.
i Insert text before cursor.
I Insert text before first nonblank character on line.
^I Unused in command mode; in insert mode, same as Tab key.
j Down arrow cursor key.
J Join two lines.
^J Down arrow cursor key; in insert mode, move down a line.
k Up arrow cursor key.
K Unused.
^K Unused.
l Right arrow cursor key.
L Move cursor to last position in window.
^L Redraw screen.
m Mark the current cursor position in register (a-z).
M Move cursor to middle position in window.
^M Carriage return.
n Repeat the last search command.
N Repeat the last search command in the reverse direction.
^N Down arrow cursor key.
o Open line below current line.
O Open line above current line.
^O Unused.
p Put yanked or deleted text after or below cursor.
P Put yanked or deleted text before or above cursor.
^P Up arrow cursor key.
q Unused.
Q Quit vi and invoke ex .
^Q Unused (on some terminals, resume data flow).
r Replace character at cursor with the next character you type.
R Replace characters.
^R Redraw the screen.
s Change the character under the cursor to typed characters.
S Change entire line.
^S Unused (on some terminals, stop data flow).
t Move cursor forward to character before next character typed.
T Move cursor backward to character after next character typed.

Return to the previous location in the tag stack (Solaris vi command mode).

If autoindent is set, indent another tab stop (insert mode).

u Undo the last change made.
U Restore current line, discarding changes.
^U Scroll the screen upward half-window.
v Unused.
V Unused.
^V Unused in command mode; in insert mode, quote next character.
w Move to beginning of next word.
W Move to beginning of next word, ignoring punctuation.

Unused in command mode; in insert mode, back up to beginning of word.

x Delete character under cursor.
X Delete character before cursor.
^X Unused.
y Yank or copy operator.
Y Make copy of current line.
^Y Show one more line at top of window.

Reposition line containing cursor. z must be followed either by: Return (reposition line to top of screen), . (reposition line to middle of screen), or - (reposition line to bottom of screen).

ZZ Exit the editor, saving changes.
^Z Suspend vi (only works on systems that have job control).

Previous: 8.8 Miscellaneous Commands UNIX in a Nutshell: System V Edition Next: 8.10 Setting Up vi
8.8 Miscellaneous Commands Book Index 8.10 Setting Up vi

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System