Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 762 Bytes

README_vim_tips_0002.md

File metadata and controls

40 lines (28 loc) · 762 Bytes

Vim 技巧0002

把多个空行压缩为一个空行。

方法一

:%!cat -s
展开查看图片 vim_tips_0002_01.gif

方法二

:%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 也可以。

展开查看图片 vim_tips_0002_02.gif

gg 回到文档顶部。

将光标移动到下面的文件名上,执行 gf 跳转。

目录

↑Back to Home↑