去掉空行

:g/^s*$/d
 
:g 代表在全文档范围内
^代表行的开始
s*代表空白字符
$代表行的结束
d代表删除
 
原文地址:https://www.cnblogs.com/black-mamba/p/5927203.html