August 2000
Intermediate to advanced
816 pages
29h 45m
English
Recall that c, d, and y are the basic editing operators.
| Command | Action |
|---|---|
a
| Append after cursor. |
A
| Append to end of line. |
i
| Insert before cursor. |
I
| Insert at beginning of line. |
o
| Open a line below cursor. |
O
| Open a line above cursor. |
| Esc | Terminate insert mode. |
| Tab | Insert a tab. |
| Backspace | Delete previous character (in insert mode). |
| Ctrl-I | Insert a tab. |
| Ctrl-U | Delete current line. |
| Ctrl-V | Insert next character verbatim. |
| Ctrl-[ | Terminate insert mode. |
Some of the control characters listed in the previous table are set by stty. Your terminal settings may differ.
The following table is not exhaustive but illustrates the most common operations.
| Command | Action |
|---|---|
cw
| Change through end of current word. |
cc
| Change line. |
c$
|
Change text from current position to end-of-line. |
C
|
Same as c$. |
dd
| Delete current line. |
d$
| Delete remainder of line. |
D
| Same as d$. |
n
dd
|
Delete n lines. |
dw
| Delete a word. |
d}
| Delete up to next paragraph. |
d^
| Delete back to beginning of line. |
d/
pattern
|
Delete up to first occurrence of pattern. |
dn
| Delete up to next occurrence of pattern. |
df
a
|
Delete up to and including a on current line. |
dt
a
|
Delete up to (not including) a on current line. |
dL
| Delete up to last line on screen. |
dG
| Delete to end-of-file. |
p
| Insert last deleted text after cursor. |
P
| Insert last deleted text before cursor. |
r
x
| Replace character with x. |
R
text
| Replace text beginning at cursor. |
s
| Substitute character. |
n
s
| Substitute ... |
Read now
Unlock full access