Vim 技巧 Vim trick

:g/^$/d
:g will execute a command on lines which match a regex. The regex is 'blank line' and the command is :d (delete)

 g 会执行一个正则表达式的命令,能删除文本里面的空行。

原文地址:https://www.cnblogs.com/peng-fei/p/3819350.html