We can delete lines after the cursor (e.g.: the next 3 lines) with:
3dd
But how can we delete the lines before the cursor? (e.g.: 3 lines before cursor)?
We can delete lines after the cursor (e.g.: the next 3 lines) with:
3dd
But how can we delete the lines before the cursor? (e.g.: 3 lines before cursor)?
2dk
same effect as 3dd
but upwards.
I use solution similar to @forcefsck's answer, but IMO slightly more consistent.
d2k
same as 2dk
.
I use mostly two kind of yank/delete(kill) command,
d
+ motion
, eg, d)
, d2j
, d3e
, d0
d
+ text-object
, eg d2aw
, dib
, da)
, dat
, das
, dip
.for some common text-object
, see
:h v_is
and
:h )
as two example.