Vim 删除空行 [英] Vim delete blank lines
本文介绍了Vim 删除空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以运行什么命令来删除 Vim 中的空行?
What command can I run to remove blank lines in Vim?
推荐答案
:g/^$/d
:g
将在匹配正则表达式的行上执行命令.正则表达式是空白行",命令是 :d
(删除)
:g
will execute a command on lines which match a regex. The regex is 'blank line' and the command is :d
(delete)
这篇关于Vim 删除空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文