vip: Delete Commands
2.9.1 Delete Commands
---------------------
‘d MOTION-COMMAND’
Delete the region determined by the motion command MOTION-COMMAND.
For example, ‘d $’ will delete the region between point and end of
current line since ‘$’ is a point command that moves point to end of
line. ‘d G’ will delete the region between the beginning of current
line and end of the buffer, since ‘G’ is a line command. A count given
to the command above will become the count for the associated motion
command. Thus, ‘3 d w’ will delete three words.
It is also possible to save the deleted text into a register you
specify. For example, you can say ‘" t 3 d w’ to delete three words and
save it to register ‘t’. The name of a register is a lower-case letter
between ‘a’ and ‘z’. If you give an upper-case letter as an argument to
a delete command, then the deleted text will be appended to the content
of the register having the corresponding lower-case letter as its name.
So, ‘" T d w’ will delete a word and append it to register ‘t’. Other
modifying commands also accept a register name as their argument, and we
will not repeat similar explanations.
We have more delete commands as below.
‘d d’
Delete a line. Given a count N, delete N lines.
‘d r’
Delete current region.
‘d R’
Expand current region and delete it.
‘D’
Delete to the end of a line (‘vip-kill-line’).
‘x’
Delete a character after point. Given N, delete N characters
(‘vip-delete-char’).
‘<DEL>’
Delete a character before point. Given N, delete N characters
(‘vip-delete-backward-char’).