UNIX in a Nutshell: System V Edition

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

8.9 Alphabetical List of Keys

For brevity, control characters are marked by ^.

aAppend text after cursor.
AAppend text at end of line.
^AUnused.
bBack up to beginning of word in current line.
BBack up to word, ignoring punctuation.
^BScroll backward one window.
cChange operator.
CChange to end of current line.
^CUnused in command mode; ends insert mode.
dDelete operator.
DDelete to end of current line.
^DScroll down half-window.
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 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.
TMove cursor backward to character after next character typed.
^T

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

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.
zReposition 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 on systems that have job control).


Previous: 8.8 Miscellaneous CommandsUNIX in a Nutshell: System V EditionNext: 8.10 Setting Up Vi
8.8 Miscellaneous CommandsBook Index8.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