For something like this I usually use shift+v, jjj...d, but you could delete using text objects as well.
See :h text-object
. A few examples:
di"
- delete inside "
dap
- delete around paragraph
And you could of course use other commands than d
, such as c
or v
.
Something I use all the time is ci(
and ci"
for editing content inside ()
and ""
.
More cool examples using text-objects and visual mode can be found here:
What is your most productive shortcut with Vim?
You could use as well, i.e. 4dd
as mentioned by FDinoff, or a range, mentioned by Jens. However in most scenarios I personally believe using visual line (shift+v) is more flexible, and you don't have to count lines or anything. It's easy to remember, you see the result instantly, you won't miss counting lines and it'll work even if you're at the top/bottom on the screen.