VS Code Extensions
A

AStyle Format

by cxy

使用 AStyle 格式化 C/C++ 代码(支持格式化文档和选定内容)

Downloads

83

Rating

— (0)

Version

1.0.3

Last updated

Aug 05, 2026

使用 Artistic Style 格式化 C/C++ 代码的 VS Code 扩展。

功能

  • 格式化文档 — 按 Alt+Shift+F 或右键 → 格式化文档
  • 格式化选定内容 — 选中代码后按 Ctrl+K Ctrl+F 或右键 → 格式化选定内容
  • 支持 C、C++、C#、Objective-C、Java

配置

在 VS Code 设置中搜索 astyle:

设置 默认值 说明
astyle.format.path C:\tools\AStyle\bin\AStyle.exe AStyle.exe 路径
astyle.format.config C:\tools\AStyle\.astylerc 配置文件路径
astyle.format.timeout 15000 超时时间(毫秒)

要求

  • AStyle 3.6+(下载)
  • .astylerc 配置文件

Related extensions