Braces layout for other statements and blocks

EditorConfig key: cpp-other-braces

Braces layout for other statements and blocks

cpp-other-braces

Fallback brace placement for statements and blocks not covered by a more specific option.

Default value:

unset

Possible values:

  • unset
  • end_of_line
  • end_of_line_no_space
  • next_line
  • next_line_shifted
  • next_line_shifted_2

Examples

unset
end_of_line
if (cond) {
  x++;
}
end_of_line_no_space
if (cond){
  x++;
}
next_line
if (cond)
{
  x++;
}
next_line_shifted
if (cond)
  {
  x++;
  }
next_line_shifted_2
if (cond)
  {
    x++;
  }