Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>AStyle FormatNew to Visual Studio Code? Get it now.
AStyle Format

AStyle Format

cxy

|
2 installs
| (0) | Free
使用 AStyle 格式化 C/C++ 代码(支持格式化文档和选定内容)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AStyle Format

使用 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 配置文件
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft