nl_after_brace_open
Whether to add a newline after '{'. This also adds a newline before the matching '}'.
Possible values are true and false, default false.
Examples
true
Before:
int main()
{
int x = 1;
int y = 2;
//just braces
{ int z = x + y;
std::cout << "z value processed" << '\n';}
return 0;
}
After
int main()
{
int x = 1;
int y = 2;
//just braces
{
int z = x + y;
std::cout << "z value processed" << '\n';
}
return 0;
}
false
Example remains unchanged.
See also
- nl_before_case: Whether to add a newline before
case
, and a blank line before acase
statement that follows a;
or}
. - nl_before_switch: Add or remove blank line before
switch
statement. - nl_for_brace: similar but for
for
statement - nl_if_brace: similar but for
if