From 93f1fa4397624ce6e22c1eeba56e80ce7e3ebe60 Mon Sep 17 00:00:00 2001 From: Frank Lamar Date: Mon, 13 Nov 2017 00:38:17 -0500 Subject: [PATCH] astyle: add page (#1543) --- pages/common/astyle.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/common/astyle.md diff --git a/pages/common/astyle.md b/pages/common/astyle.md new file mode 100644 index 0000000000..09619b7616 --- /dev/null +++ b/pages/common/astyle.md @@ -0,0 +1,24 @@ +# astyle + +> Source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages. +> Upon running, a copy of the original file is created with an ".orig" appended to the original file name. + +- Apply the default style of 4 spaces per indent and no formatting changes: + +`astyle {{source_file}}` + +- Apply the java style with attached braces: + +`astyle --style=java {{path/to/file}}` + +- Apply the allman style with broken braces: + +`astyle --style=allman {{path/to/file}}` + +- Apply a custom indent using spaces. Choose between 2 and 20 spaces: + +`astyle --indent=spaces={{number_of_spaces}} {{path/to/file}}` + +- Apply a custom indent using tabs. Choose between 2 and 20 tabs: + +`astyle --indent=tab={{number_of_tabs}} {{path/to/file}}`