把多个空行压缩为一个空行。
:%!cat -s
:%s!\n\n\n\+!^M^M!g
The ^M is the visual representation of a newline, you can enter it by hitting Ctrl+v Enter
.
试了下 :%s!\n\n\n\+!\r\r!g
也可以。
按
gg
回到文档顶部。将光标移动到下面的文件名上,执行
gf
跳转。
把多个空行压缩为一个空行。
:%!cat -s
:%s!\n\n\n\+!^M^M!g
The ^M is the visual representation of a newline, you can enter it by hitting Ctrl+v Enter
.
试了下 :%s!\n\n\n\+!\r\r!g
也可以。
按
gg
回到文档顶部。将光标移动到下面的文件名上,执行
gf
跳转。