uncrustify的配置使用

uncrustify是一个代码格式化工具,支持mac win linux平台,可单独使用,也可被第三方工具(如Source insight,Atom)调用。本文讨论MAC下的安装配置方法。

1、安装

使用homebrew安装,命令:brew install uncrustify

2、使用方法

uncrustify -h 命令可以查看使用方法,

uncrustify --show-config 命令可以列出所有配置项和配置说明

3、Atom配置方法

安装atom uncrustify插件;

~/ 下新建 .uncrustify 目录,将配置文件(官网有默认配置文件)放到下面,改名为例如uncrustify.cfg 
(详细见官网 http://uncrustify.sourceforge.net ) ,然后在atom的atom-beautify包设置里面指定uncrustify.cfg路径。


Note: Use comments containing ' *INDENT-OFF*' and ' *INDENT-ON*' to disable

      processing of parts of the source file (these can be overridden with

      enable_processing_cmt and disable_processing_cmt).


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值