Tuesday, January 13, 2009

Delete to End of Page

Typing `dL' in normal mode will delete to the end of the current page. In other words, everything visible to the bottom of the window.

5 comments:

Zsoltik@ said...

And dG works as well...

Anonymous said...

dM and dH work also.

Travis Whitton said...

@Zsoltik

dG, which I use more commonly deletes to the end of the file. dL deletes from your cursor location to the end of what's visible in the current window.

Zsoltik@ said...

Shame on me, missread the title.

Derek Wyatt said...

"... everything visible to the bottom of the window" isn't quite correct.

If you've got 'scrolloff' set then things might be slightly different.

:h 'scrolloff'