{ BasedOnStyle: LLVM, # 使用tab字符: Never, ForIndentation, ForContinuationAndIndentation, Always UseTab: Never, # 缩进宽度 IndentWidth: 4, # tab宽度 TabWidth: 4, # 在大括号前换行: Attach(始终将大括号附加到周围的上下文), Linux(除函数、命名空间和类定义,与Attach类似), # Mozilla(除枚举、函数、记录定义,与Attach类似), Stroustrup(除函数定义、catch、else,与Attach类似), # Allman(总是在大括号前换行), GNU(总是在大括号前换行,并对于控制语句的大括号增加额外的缩进), WebKit(在函数前换行), Custom # 注:这里认为语句块也属于函数 BreakBeforeBraces: Mozilla, # 允许短的if语句保持在同一行 AllowShortIfStatementsOnASingleLine: false, # 缩进case标签 IndentCaseLabels: false, # 每行字符的限制,0表示没有限制 ColumnLimit: 120, # 访问说明符(public、private等)的偏移 AccessModifierOffset: -4, # 命名空间的缩进: None, Inner(缩进嵌套的命名空间中的内容), All NamespaceIndentation: None, }