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


UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: 8.8 Miscellaneous Commands Chapter 8
The Vi Editor
Next: 8.10 Setting Up Vi
 

8.9 Alphabetical List of Keys

For brevity, control characters are marked by ^ .

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 word, ignoring punctuation.
^B Scroll backward one window.
c Change operator.
C Change to end of current line.
^C Unused in command mode; ends insert mode.
d Delete operator.
D Delete to end of current line.
^D Scroll down half-window.
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 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.
^T

Unused in command mode; in insert mode, use if autoindent is set.

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.
^W

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.
z 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 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 Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System