Delete all but the last n lines in vim
Just a small tidbit. If you ever need to delete all lines from the cursor, except the last n lines in Vim, you can use the ex command
:,$-ndWhere n is number of lines you want to retain from the bottom. For example, if you have a footer on the last line, you can use
:,$-1dTo delete all but the last line.
Toomore Chiang