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
Where 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
To delete all but the last line.