You are on page 1of 1

EDIT COMMANDS

Edit Line Commands:


Copying lines
C
Cn
CC
ending with the

Copy this line


Copy n lines starting with this line (where n is a number)
Copy a block of lines starting with the first CC command and
second CC command.

A
An
B
Bn

Place the copied lines after this line.


Repeat the copied lines n times after this line
Place the copied lines before this line
Repeat the copied lines n times before this line.

Deleting lines
D
Delete this line.
Dn
Delete n lines starting with this line
DD
Delete the block of lines starting with the first DD command and
ending with the second DD command.
Excluding and redisplaying lines.
X
Exclude this line.
Xn
Exclude n lines starting with this line.
XX
Exclude a block of lines.
S
Sn

Show one line of the excluded text.


Show n lines.

F
Fn

Show the first line of the excluded text.


Show the first n lines of the excluded text.

L
Ln

Show the last line of the excluded text.


Show the last n lines of the excluded text.

Edit Line Commands: Inserting Lines: I


Insert one line following this l
ine. In
Insert n lines following this line.
Moving Lines:
M
Mn
MM
h
A
An
B
Bn

Move this line.


Move n lines starting with this line.
Move a block of lines beginning with the first MM and ending wit
the second MM.
Place the moved lines after this line.
Repeat the moved lines n times after this line.
Place the moved lines before this line.
Repeat the moved lines n times before this line.

You might also like