---
Language: Cpp
# 基础风格
BasedOnStyle: LLVM
# BSD / Allman 风格括号
BreakBeforeBraces: Allman
# 缩进
IndentWidth: 4
TabWidth: 4
UseTab: Never
# namespace 缩进
NamespaceIndentation: All
# class 访问修饰符缩进
AccessModifierOffset: -4
IndentAccessModifiers: false
# switch/case
IndentCaseLabels: false
IndentCaseBlocks: false
# 预处理
IndentPPDirectives: None
# 指针与引用
PointerAlignment: Right
ReferenceAlignment: Pointer
# 空格
SpaceBeforeParens: ControlStatements
SpacesInParentheses: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
# 运算符对齐
AlignOperands: Align
# 连续赋值不对齐
AlignConsecutiveAssignments: None
# 括号换行
BreakBeforeBinaryOperators: None
# 一行语句
AllowShortBlocksOnASingleLine: Always
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Inline
# else if 保持同一行
BeforeElse: false
# 模板 >>
SpacesInAngles: Never
# 空行
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
# 注释
ReflowComments: false
# 行宽
ColumnLimit: 0
# 多行条件缩进
ContinuationIndentWidth: 8
# include 排序
SortIncludes: false
# C++11
Standard: c++11
...
Astyle对应.clang-format
xyz5992026-06-08 21:14
相关推荐
这就是佬们吗7 小时前
Python入门③-运算符、条件与循环2501_915921438 小时前
从零开始学 Swift iOS 开发 iOS应用入门爱吃提升1 天前
VSCode 配置 Claude + Codex 完整教程云泽8081 天前
VSCode入门指南:从认识、安装到语言插件配置全解析爱吃提升1 天前
VSCode AI编程万能提示词模板(适配Copilot/Codeium/Continue/豆包AI)信鸽爱好者2 天前
VSCode配置python虚拟环境路径爱吃提升2 天前
2026最新VSCode 详细下载安装教程+汉化教程(含快捷键与使用趋势)五VV2 天前
VSCode_Markdown文件中自动公式编号设置的一种方法热爱生活的五柒4 天前
如何快速删除vscode项目下所有的http链接lbb 小魔仙4 天前
从零搭建Python开发环境:Python安装 + VSCode + PyCharm 完整配置指南