Reputation: 6387
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.
Upvotes: 12
Views: 3713
Reputation: 42228
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.)
Upvotes: 2
Reputation: 8402
You could select the lines that you want to delete in visual
mode and then d
elete those.
Upvotes: 1