B.10. vi Control Mode Commands

 < Day Day Up > 

Table B-11 shows a complete list of all vi control mode commands.

Table B-11. vi control mode commands

Command

Meaning

h

Move left one character

l

Move right one character

w

Move right one word

b

Move left one word

W

Move to beginning of next non-blank word

B

Move to beginning of preceding non-blank word

e

Move to end of current word

E

Move to end of current non-blank word

0

Move to beginning of line

.

Repeat the last a insertion.

^

Move to first non-blank character in line

$

Move to end of line

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

Overwrite existing text

dh

Delete one character backward

dl

Delete one character forward

db

Delete one word backward

dw

Delete one word forward

dB

Delete one non-blank word backward

dW

Delete one non-blank word forward

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)

x

Equivalent to dl (delete character forwards)

X

Equivalent to dh (delete character backwards)

k or -

Move backward one line

j or +

Move forward one line

G

Move to line given by repeat count

/string

Search forward for string

?string

Search backward for string

n

Repeat search forward

N

Repeat search backward

fx

Move right to next occurrence of x

Fx

Move left to previous occurrence of x

tx

Move right to next occurrence of x, then back one space

Tx

Move left to previous occurrence of x, then forward one space

;

Redo last character finding command

,

Redo last character finding command in opposite direction

\

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

CTRL-L

Start a new line and redraw the current line on it

#

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


     < Day Day Up > 


    Learning the bash Shell
    Learning the bash Shell: Unix Shell Programming (In a Nutshell (OReilly))
    ISBN: 0596009658
    EAN: 2147483647
    Year: 2005
    Pages: 139

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net