Think before you speak, read before you think.

vim对文档进行排版

by

in

1. 按v进入visual状态,选择多行,用>或<缩进或缩出

2. 自动缩进排版,相当于code format

当前行用== (连按=两次)
对多行用n==(n是自然数)表示自动缩进从当前行起的下面n行。
先使用gg使光标跳到第一行行首,再按=G可对整篇代码进行排版。


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *