start page | rating of books | rating of authors | reviews | copyrights

Book HomeBook TitleSearch this book

8.9. Alphabetical List of Keys

For brevity, control characters are marked by ^.

^]Perform a tag look-up on the text under the cursor.
aAppend text after cursor.
AAppend text at end of line.
^AUnused.
bBack up to beginning of word in current line.
BBack up to beginning of word, ignoring punctuation.
^BScroll backward one window.
cChange operator.
CChange to end of current line.
^C

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

d Delete operator.
D

Delete to end of current line.

^D

Scroll down half-window (command mode).

Move backward one tab-stop (insert mode).

eMove to end of word.
EMove to end of word, ignoring punctuation.
^EShow one more line at bottom of window.
fFind next character typed forward on current line.
FFind next character typed backward on current line.
^FScroll forward one window.
gUnused.
GGo to specified line or end of file.
^GPrint information about file on status line.
hLeft arrow cursor key.
HMove cursor to Home position.
^HLeft arrow cursor key; Backspace key in insert mode.
iInsert text before cursor.
IInsert text before first nonblank character on line.
^IUnused in command mode; in insert mode, same as Tab key.
jDown arrow cursor key.
JJoin two lines.
^JDown arrow cursor key; in insert mode, move down a line.
kUp arrow cursor key.
KUnused.
^KUnused.
lRight arrow cursor key.
LMove cursor to last position in window.
^LRedraw screen.
mMark the current cursor position in register (a–z).
MMove cursor to middle position in window.
^MCarriage return.
nRepeat the last search command.
NRepeat the last search command in the reverse direction.
^NDown arrow cursor key.
oOpen line below current line.
OOpen line above current line.
^OUnused.
pPut yanked or deleted text after or below cursor.
PPut yanked or deleted text before or above cursor.
^PUp arrow cursor key.
qUnused.
QQuit vi and invoke ex.
^QUnused (on some terminals, resume data flow).
rReplace character at cursor with the next character you type.
RReplace characters.
^RRedraw the screen.
sChange the character under the cursor to typed characters.
SChange entire line.
^SUnused (on some terminals, stop data flow).
tMove cursor forward to character before next character typed.
T

Move cursor backward to character after next character typed.

^T

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

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

uUndo the last change made.
URestore current line, discarding changes.
^UScroll the screen upward half-window.
vUnused.
VUnused.
^VUnused in command mode; in insert mode, quote next character.
wMove to beginning of next word.
WMove to beginning of next word, ignoring punctuation.
^W

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

xDelete character under cursor.
XDelete character before cursor.
^XUnused.
yYank or copy operator.
YMake copy of current line.
^YShow 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).

ZZExit the editor, saving changes.
^ZSuspend vi (only works on systems that have job control).



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.