vim设置c语言代码风格
Vim provides some basic formatting commands. A combination of these commands with the editing commands will make the programmer happy.
Vim提供了一些基本的格式化命令。 这些命令与编辑命令的组合将使程序员满意。
A list of basic text formatting commands in Vim:
Vim中的基本文本格式命令列表:
- ==
- i{i {vv==
Some basic but useful operation that are combination of the two basic ones above:
一些基本但有用的操作,它们是上述两个基本操作的组合:
- vi{vi {在
- =i{= i {
- =2i{= 2i {
- ====
The method to format a block of C/C++ or Java code:
格式化C / C ++或Java代码块的方法:
- start 开始 point of codes to be formatted, then press 点代码进行格式化,然后按vV
- Second, go to the end point. 第二,到终点。
- ==
A short way to format the whole buffer:
格式化整个缓冲区的一种简短方法:
- gg=G gg = G
vim设置c语言代码风格