编程语言
首页 > 编程语言> > Code::Blocks 使用 AStyle 格式化 C/C++ 代码

Code::Blocks 使用 AStyle 格式化 C/C++ 代码

作者:互联网

目录

AStyle

A Free, Fast, and Small Automatic Formatter
for C, C++, C++/CLI, Objective‑C, C#, and Java Source Code

Project Page: http://astyle.sourceforge.net/
SourceForge: http://sourceforge.net/projects/astyle/

Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C++/CLI, Objective‑C, C# and Java programming languages.

Code::Blocks Source code formatter plugin

Code::Blocks 的 Source code formatter plugin 使用 AStyle 格式化 C/C++ 代码。

Settings -> Editor -> Source formatter

Style

Figure 1: Style

Brackets

Figure 2: Brackets

Indentation

Figure 3: Indentation

Formatting

Figure 4: Formatting

Padding

Figure 5: Padding

Source code formatter (AStyle) shortcut

Settings -> Editor -> Keyboard shortcuts -> Plugins -> Source code formatter (AStyle)

shortcut: Ctrl-Shift-I(Indent)

标签:code,Blocks,C++,Source,Code,AStyle,formatter
来源: https://www.cnblogs.com/typescript/p/11456493.html