在项目根目录下,创建一个文件.clang-format,使用vim打开并修改。

具体的配置风格可以看这里:http://clang.llvm.org/docs/ClangFormatStyleOptions.html

下面是我自己的风格配置,

UseTab: Never
IndentWidth:
BreakBeforeBraces: Attach
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit:

或:

BasedOnStyle: LLVM
UseTab: Never
IndentWidth:
BreakBeforeBraces: Allman
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit:
SpacesBeforeTrailingComments:
AlignTrailingComments: true
ObjCBlockIndentWidth:

tip:  这个好像会和react-native的rnpm link 命令冲突。

配置自己风格的Clang-Format-Xcode的更多相关文章

  1. clang format 官方文档自定义参数介绍(中英文)

    官方文档:http://clang.llvm.org/docs/ClangFormatStyleOptions.html 中文 在代码中配置样式 当使用 clang::format::reformat ...

  2. 在Xcode中使用Clang Format

    Xcode中的Re-Indent,顾名思义,只是一个调整缩进的功能,完全依赖它来进行代码格式化显然不够用.我们使用了一个叫做ClangFormat-Xcode的插件,配合Re-Indent一起来做代码 ...

  3. Clang Format

    1,最近项目代码要求规范化,在网上找了个Xcode插件:Clang Format ,下载地址:https://github.com/travisjeffery/ClangFormat-Xcode 2, ...

  4. Spring MVC 使用HiddenHttpMethodFilter配置Rest风格的URL

    /** Rest 风格的 URL. 以 CRUD 为例: 新增: /order POST 修改: /order/1 PUT update?id=1 获取:/order/1 GET get?id=1 删 ...

  5. 【源码分析】FastJson全局配置日期格式导致@JSONField(format = "yyyy-MM-dd")注解失效

    出现的问题 我全局配置的时间格式是:yyyy-MM-dd HH:mm:ss @JSONField注解配置的时间格式是:yyyy-MM-dd 最终的返回结果是:yyyy-MM-dd HH:mm:ss 问 ...

  6. Spring MVC 使用拦截器 HiddenHttpMethodFilter配置Rest风格的URL

    <!-- 4.使用Rest风格的URI,将页面普通的post请求转为指定的delete或者put请求 --> 详细使用请参考这篇博客:地址:http://blog.csdn.net/ppl ...

  7. nginx 默认配置语法和日志的format

    nginx 默认配置 查看有nginx哪些默认配置文件,打开/etc/nginx/nginx.conf文件,查看尾行部分 会默认将/etc/nginx/conf.d/文件下其他以.conf结尾的配置文 ...

  8. clang format 自定义样式常用参数说明

    常用的格式设置: #如果为真(true),分析格式化过的文件中最常见的&和*的对齐方式.然后指针对齐仅作为回退 DerivePointerAlignment: false #缩进宽度 Inde ...

  9. emacs之配置代码风格

    emacsConfig/code-style-setting.el (add-hook 'c-mode-common-hook ( lambda() ( c-set-style "java& ...

随机推荐

  1. android的edittext输入长度

    http://blog.csdn.net/uyu2yiyi/article/details/6329738 http://flysnow.iteye.com/blog/828415/ http://s ...

  2. INNO SETUP 获得命令行参数

    原文 http://www.cnblogs.com/ahuo/archive/2009/07/30/1534998.html );           Result := CmdLine;       ...

  3. apache httpd, nginx, tomcat, jboss

    web上的server都叫web server,但是大家分工也有不同的. nginx常用做静态内容服务和代理服务器(不是你FQ那个代理),直面外来请求转发给后面的应用服务(tomcat,django什 ...

  4. Opencv下图像对鼠标事件的响应

    直接上代码: //////////////////////////////////////////////////////////////////////// // // 该程序从文件中读入一幅图像, ...

  5. JS页面赋值

    <html>  <title>页面1</title> <div> <ul>  <li> <div class=" ...

  6. OC基础14:使用文件

    "OC基础"这个分类的文章是我在自学Stephen G.Kochan的<Objective-C程序设计第6版>过程中的笔记. 1.对于NSFileManager类,文件 ...

  7. Apple Mach-O Linker Warning 警告解决的方法

    此警告解决的方法: 项目名字 -> targets -> Build Settings -> search path 把里面无用的东西 点 减号 删掉 即可了. $(function ...

  8. .NET MV4 Remote远程验证注意事项及案例

    首先是模型代码 public class LoginModel { [Required] [Display(Name = "用户名")] [Remote("CheckNa ...

  9. 2016年gift上线相关知识点记录

    1.图片初始化加载 2.如何判断横屏 function horAver() { if (window.orientation == 90 || window.orientation == -90) { ...

  10. How to recover a skipped tablespace after an incomplete recovery with resetlogs? [ID 1561645.1]

    n this Document   Goal   Solution This document is being delivered to you via Oracle Support's Rapid ...