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 会执行一个正则表达式的命令,能删除文本里面的空行。

posted @ 2014-07-02 00:21  pengfeis  阅读(136)  评论(0)    收藏  举报