Remastered original answer
Not the answer you are looking for but (unless we're playing Vim golf) I'd just type d$jdG
or DjdG
(as Izkata was kind enough to point out) and nothing fancy. That's deleting the rest of the line with d$
or D
, going down one line with j
and then deleting the rest of the buffer with dG
.
This is a few more keystrokes but they come naturally to me, my fingers can stay on the home row for the most part and it's done before I even started to think if there's a shorter way to do it.
Anyways it's much faster than me playing hide and seek with End. Every manufacturer seems to have their own scheme of hiding this fine key. So I would definitely have to look down on my keyboard to locate it. Not worth it.
Bonus track
The caveat of above solution is that it's technically two deletions. It needs uu
to undo, can't be repeated with .
etc.
In comparison, using visual mode as per Zac's great answer we can undo with a single u
but also not safely repeat. Using visual mode is better in this case but by no means perfect.
Seeing how d<C-End>
solves exactly the problem and how awkward the End key is, you may consider remapping the motion to a key you can actually touch type. There does not seem to be a motion Z
and z is at the end of the alphabet so I picked it:
:onoremap Z <C-End>
And dZ
will behave exactly like d<C-End>
and remove everything in the buffer starting from the cursor position. The whole family of cZ
, yZ
etc. will work.
This, you can undo with u
and repeat with .
.