O'Reilly logo

Learning the Korn Shell, 2nd Edition by Bill Rosenblatt, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

vi Control Mode Commands

Here is a complete list of all vi-mode control commands. As for the emacs mode commands, the sequences such as “[ A” are for ANSI standard terminal arrow keys and were added for ksh93h.

CommandMeaning
h Move left one character
[ D Move left one character (ksh93h and newer)
l Move right one character
space Move right one character
[ C Move right one character (ksh93h and newer)
w Move right one word
b Move left one word
W Move to beginning of next nonblank word
B Move to beginning of preceding nonblank word
e Move to end of current word
E Move to end of current nonblank word
0 Move to beginning of line
[ H Move to beginning of line (ksh93h and newer)
^ Move to first nonblank character in line
$ Move to end of line
[ Y Move to end of line (ksh93h and newer)
i Insert text before current character
a Insert text after current character
I Insert text at beginning of line
A Insert text at end of line
r Replace one character (doesn’t enter input mode)
R Overwrite existing text
dh Delete one character backwards
dl Delete one character forwards
db Delete one word backwards
dw Delete one word forwards
dB Delete one nonblank word backwards
dW Delete one nonblank word forwards
d$ Delete to end of line
d0 Delete to beginning of line
D Equivalent to d$ (delete to end of line)
dd Equivalent to 0d$ (delete entire line)
C Equivalent to c$ (delete to end of line, enter input mode)
cc Equivalent to 0c$ (delete entire line, enter input mode)
s Equivalent to xi (delete current ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required