Learning the Korn Shell

Learning the Korn ShellSearch this book
Previous: B.7 Emacs Mode CommandsAppendix B
Reference Lists
Next: C. Obtaining Sample Programs
 

B.8 Vi Control Mode Commands

Here is a complete list of all vi control mode commands.
CommandMeaning
hMove left one character
lMove right one character
wMove right one word
bMove left one word
WMove to beginning of next non-blank word
BMove to beginning of preceding non-blank word
eMove to end of current word
EMove to end of current non-blank word
0Move to beginning of line
^Move to first non-blank character in line
$Move to end of line
iInsert text before current character
aInsert text after current character
IInsert text at beginning of line
AInsert text at end of line
ROverwrite existing text
dhDelete one character backwards
dlDelete one character forwards
dbDelete one word backwards
dwDelete one word forwards
dBDelete one non-blank word backwards
dWDelete one non-blank word forwards
d$Delete to end of line
d0Delete to beginning of line
DEquivalent to d$ (delete to end of line)
ddEquivalent to 0d$ (delete entire line)
CEquivalent to c$ (delete to end of line, enter input mode)
ccEquivalent to 0c$ (delete entire line, enter input mode)
xEquivalent to dl (delete character backwards)
XEquivalent to dh (delete character forwards)
k or -Move backward one line
j or +Move forward one line
GMove to line given by repeat count
/stringSearch forward for string
?stringSearch backward for string
nRepeat search forward
NRepeat search backward
fxMove right to next occurrence of x
FxMove left to previous occurrence of x
txMove right to next occurrence of x, then back one space
TxMove left to previous occurrence of x, then forward one space
,Undo motion of last character finding command
;Redo last character finding command
\Do filename completion
*Do wildcard expansion (onto command line)
\=Do wildcard expansion (as printed list)
~Invert ("twiddle") case of current character(s)
\_Append last word of previous command, enter input mode
v

Run the fc command on the current line (actually, run the command fc -e ${VISUAL:-${EDITOR:-vi}}). Usually this means run the full vi on the current line.

[CTRL-L]

Start a new line and redraw the current line on it

#

Prepend # (comment character) to the line and send it

xInsert expansion of alias _x


Previous: B.7 Emacs Mode CommandsLearning the Korn ShellNext: C. Obtaining Sample Programs
B.7 Emacs Mode CommandsBook IndexC. Obtaining Sample Programs

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