Generic brace style

EditorConfig key: cpp-brace-style

Generic brace style

cpp-brace-style

Fallback brace layout used where a more specific option does not apply.

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++;
  }