LinuxCommandLibrary

astyle

astyle

TLDR

Apply the default style of 4 spaces per indent and no formatting changes

$ astyle [source_file]
copy


Apply the Java style with attached braces
$ astyle --style=java [path/to/file]
copy


Apply the allman style with broken braces
$ astyle --style=allman [path/to/file]
copy


Apply a custom indent using spaces. Choose between 2 and 20 spaces
$ astyle --indent=spaces=[number_of_spaces] [path/to/file]
copy


Apply a custom indent using tabs. Choose between 2 and 20 tabs
$ astyle --indent=tab=[number_of_tabs] [path/to/file]
copy

SYNOPSIS

astyle

astyle [options] File1 [File2] [...]

DESCRIPTION

Artistic Style (or astyle) is a source code indenter, formatter and beautifier, written in C++. It handles the following programming languages:

  • C

  • C++

  • C++/CLI

  • Objective-C

  • C#

  • Java

USAGE

For the full usage, please refer to the HTML documentation provided with this distribution in /usr/share/doc/astyle/html

Please note that when indenting a specific file the newly indented file retains the original filename, while a copy of the original file is created, with a suffix of ".orig" added to the original filename.

SEE ALSO

indent(1) http://astyle.sourceforge.net/ http://www.sourceforge.net/projects/astyle/ http://packages.debian.org/astyle

AUTHOR

Artistic Style was originally written by Tal Davidson <davidsont@bigfoot.com> and is currently maintained by Jim Pattee <jimp03@email.com>.

This stub manual page was written by Matteo Cypriani <mcy@lm7.fr> for the Debian project.

Copied to clipboard