Vim delete blank lines
我可以运行什么命令来删除Vim中的空行?
:g/^$/d
:g
will execute a command on lines which match a regex. The regex is 'blank line' and the command is :d
(delete)
Found it, it's:
g/^s*$/d
Source: Power of g at vim wikia
:v/./d
or
:g/^$/d
or
:%!cat -s
链接地址: http://www.djcxy.com/p/4900.html
上一篇: 将所有行复制到剪贴板
下一篇: Vim删除空行