---
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
相关推荐
xx~t6 小时前
嵌入式——Linux软件编程——网络1逐步前行12 小时前
ESP32-S3-VSCode扩展ESP-IDF2501_9160088915 小时前
Flutter 开发 iOS,项目打包成 IPA,命令与免 Xcode两种方法witton3 天前
MacOS中在目录或者文件右键菜单中添加“使用VSCode打开”码上暴富4 天前
Cursor / VS Code 自定义文件颜色2601_962381584 天前
VSCode如何配置LlamaIndex RAG(检索增强生成)应用开发环境北漂燕郊杨哥4 天前
VS Code 安装微信小程序 MCP 介绍YZJenny4 天前
在服务器上安装使用code-server(Web 版 VS Code)salestina5 天前
vscode迁移扩展目录sunoo-2295 天前
【Linux 系统编程】学习第七天:线程属性 | 互斥锁 | 死锁 | 信号量 核心知识点 + 踩坑实战