Description
This is Issue 939 moved from a Google Code project.
Added by 2012-06-01T03:06:51.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Enhancement, Priority-Medium, OpSys-All, Component-IDE
Original description
What change would like to see?
Currently, auto-format turns:
int foo[] = { 1, 2, 3, 4, 5};
into:
int foo[] = {
1, 2, 3, 4, 5};
Because it treats all left / opening curly braces { as the start of a code block.
Instead, we should see if the brace is right after an equals sign and, if so, not insert a newline after it. Or, actually, we should probably just check if the matching closing brace is on the same line as the opening brace (in which case, the user probably wants it that way and we should leave it alone). That would apply to code to, for example:
for (int i = 0; i < 5; i++) { Serial.println(i); }
or:
void loop() {}