Deletion

The [x] command deletes the character under the cursor. You can precede the [x] command by a repeat factor, i.e., a number that indicates the number of characters you wish to delete.

If you wish to delete words or lines, use the [d] operator. The [d] operator is used along with a repeat factor and a Unit of Measure. Here is a list of some useful delete commands and their results:

d0
delete to beginning of line (That's a zero!)
dw
delete to end of word
d3w
delete to end of third word
db
delete to beginning of word
dd
delete current line
5dd
delete 5 lines starting with the current line
d)
delete to end of sentence
On some terminals, deleted lines are replaced by an @ symbol at the left of the screen. These lines will not be written to the Work Buffer. If you wish to redraw the screen to get rid of the @s type [CTRL-R] while in command mode.

Click here to go to the next section.

Or click here to go to the top of the chapter.