What command can I run to remove blank lines in Vim?
Found it, it's:
g/^\s*$/d
Source: Power of g at vim wikia
Brief explanation of
:g
:[range]g/pattern/cmd
This acts on the specified [range] (default whole file), by executing the Ex command cmd for each line matching pattern (an Ex command is one starting with a colon such as
:d
for delete). Before executing cmd, ".
" is set to the current line.