Skip to content

Instantly share code, notes, and snippets.

@N0NB
Created December 6, 2015 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save N0NB/e853f60bdd0decea1247 to your computer and use it in GitHub Desktop.
Save N0NB/e853f60bdd0decea1247 to your computer and use it in GitHub Desktop.
My local astylerc
# astylerc--custom options for astyle
# K&R style formatting/indenting uses linux brackets.
style=kr
# Use tab width with the default of 4 spaces.
indent=spaces
# Indent 'switch' blocks so that the 'case X:' statements
# are indented in the switch block.
indent-switches
# Indent C++ comments beginning in column one.
#indent-col1-comments
# Set the minimal indent that is added when a header is built of multiple lines.
# 0 - no minimal indent. The lines will be aligned with the paren on the preceding line.
# 1 - indent at least one additional indent.
# 2 - indent at least two additional indents.
# 3 - indent at least one-half an additional indent. This is intended for large indents (e.g. 8).
#min-conditional-indent=3
# Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...).
break-blocks
# Remove extra space padding around parenthesis on the inside and outside.
unpad-paren
# Insert space padding around operators.
pad-oper
# Insert space padding after paren headers only (e.g. 'if', 'for', 'while'...).
pad-header
# Delete empty lines within a function or method.
#delete-empty-lines
# Attach a pointer operator (*) to name (name) and reference operator (&)
# to type (type).
align-pointer=name
align-reference=type
# Don't break one-line blocks.
keep-one-line-blocks
# Don't break complex statements and multiple statements residing on a single line.
keep-one-line-statements
# Converts tabs into spaces in the non-indentation part of the line.
convert-tabs
@N0NB
Copy link
Author

N0NB commented Dec 6, 2015

This is the astylerc I used to format the code in Xdx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment