Is there a shortcut for 10k10dd
? I want to delete the 10 lines prior to the cursor, without having to move the cursor backwards first.
Did you try something like d10k
?
In certain circumstances, those 10 lines are the beginning of a paragraph than you can delete with:
d{
or the beginning of a ( C-like) function
d[[
See :help object-motions
for more details and ideas.
It is usually easier to use text objects than to count lines. ( Well on Vim latest versions, you can use set rnu
to avoid manually counting backward or forward lines.)
You could select the lines that you want to delete in visual
mode and then d
elete those.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With