indent_braces
Whether braces are indented to the body level.
Possible values are true and false, default false.
Examples
true
Before:
int main()
{
int x = 10;
int y = 20;
// if with else
if (x<y) {
std::cout << "Also x is less than " << y << '\n';
}
else {
std::cout << "Also x is more (or equal) than " << y << '\n';
}
return 0;
}
code after:
int main()
{
int x = 10;
int y = 20;
// if with else
if (x<y) {
std::cout << "Also x is less than " << y << '\n';
}
else {
std::cout << "Also x is more (or equal) than " << y << '\n';
}
return 0;
}
See also
- nl_else_brace - similar option but for else without if
- nl_if_brace - similar option but for
if
- nl_before_switch - Add or remove blank line before 'switch'.
- indent_braces_no_class: Whether to disable indenting class braces if
indent_braces=true
. - indent_braces_no_func: Whether to disable indenting function braces if
indent_braces=true
. - indent_braces_no_struct: Whether to disable indenting struct braces if
indent_braces=true
.