blank line

A vim “delete blank lines” command

vim FAQ: How do I delete blank lines in vim?

To delete blank lines in vim (empty lines), use this vim last line mode command:

:g/^$/d

Here's a brief explanation of how this "vim delete blank lines" command works: