mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-09 18:58:01 +00:00
Update cheatsheets
This commit is contained in:
10
tldr/astyle
10
tldr/astyle
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> 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.
|
||||
> More information: <https://astyle.sourceforge.net>.
|
||||
> More information: <https://manned.org/astyle>.
|
||||
|
||||
- Apply the default style of 4 spaces per indent and no formatting changes:
|
||||
|
||||
@@ -15,16 +15,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Apply the Java style with attached braces:
|
||||
|
||||
`astyle --style=java {{path/to/file}}`
|
||||
`astyle {{[-A2|--style=java]}} {{path/to/file}}`
|
||||
|
||||
- Apply the allman style with broken braces:
|
||||
|
||||
`astyle --style=allman {{path/to/file}}`
|
||||
`astyle {{[-A1|--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}}`
|
||||
`astyle {{[-s|--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}}`
|
||||
`astyle {{[-t|--indent=tab=]}}{{number_of_tabs}} {{path/to/file}}`
|
||||
|
||||
Reference in New Issue
Block a user