Go to the starting line of your block, and type ma (mark "a", though you can of course use different letters, and even multiple letters for different marks provided you can keep it straight in your head what each letter is a mark of).
Then go to the last line and enter d'a (delete to mark "a") or y'a (yank to mark "a") (a).
That will delete/yank all lines from the current to the marked one (inclusive).
Then you can paste it somewhere else with the normal paste commands, such as p or P.
It's also compatible with vi
as well as vim
, on the off chance that your environment is not blessed with the latter.
(a) I also use this to save my place in the file if I have to go looking elsewhere for something like, for example, copy-pasting the definition of a function I want to call.
I simply mark the current line in the same way, ma, then wander off to find whatever you're looking for.
Then, once I've found it and copied it to a register, I just enter 'a to go back to mark "a", the line I saved beforehand, where I can then paste it.
move
to the end. Then deleting to the end is no different than moving to the end.