vim设置c语言代码风格_Vim缩进C / C ++代码

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

翻译自: https://www.systutorials.com/vim-formatting-cc-code/

vim设置c语言代码风格

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值