How can I quickly delete a line in VIM starting at the cursor position?
Solution 1:
(Edited to include commenter's good additions:)
D
or its equivalent d$
will delete the rest of the line and leave you in command mode. C
or c$
will delete the rest of the line and put you in insert mode, and new text will be appended to the line.
This is part of vitutor
and vimtutor
, excellent "reads" for vim beginners.
Solution 2:
Use D. See docs for further information.
Solution 3:
You might also be interested in C, it will also delete the end of line like D, but additionally it will put you in Insert mode at the cursor location.