So for long lines to move an argument over to align with its predecessor on the previous line, like
int f() {
int someVariableName = myFunctionCall(expr(5), // <--- line A
somethingElse(9), // <--- line B
a_long * expression + involving(multiple.subExprs));
int d = somethingElse; // <-- line C
}
...you're saying line A is indented with tabs, and line B with spaces? Because that will misalign if your tab setting isn't the same.
Or are you saying that both A and B are indented with spaces? Then what about line C, which will misalign with A and B if your tab stop is a different width?
Or do we indent the entire body of f() with spaces, and then in that case you're basically using spaces everywhere, which the good idea that sparked this whole thing?
I think he's saying use tabs on lines A, B, and C up until the indentation level (the "int"). Then on line B use spaces for all the whitespace from there until the text is aligned.
/*t*/int f() {
/*tabs*/int someVariableName = myFunctionCall(expr(5), // <--- line A
/*tabs*//*--------------spaces--------------*/somethingElse(9), // <--- line B
/*tabs*//*--------------spaces--------------*/a_long * expression + involving(multiple.subExprs));
/*tabs*/int d = somethingElse; // <-- line C
/*t*/}
You indent line A with tabs. You use tabs to line the start of line B up with the start of line A (indentation) and then use spaces to move it the rest of the way to where you want it (alignment).
And as an aside, it's worth pointing out that most editors will handle the initial tab part automatically, so it's not like you have to do mental math to think "okay, this many tabs, and now switch to spaces". Just at the end of line A, you hit enter and start hammering the space bar.
Or are you saying that both A and B are indented with spaces? Then what about line C, which will misalign with A and B if your tab stop is a different width?
Or do we indent the entire body of f() with spaces, and then in that case you're basically using spaces everywhere, which the good idea that sparked this whole thing?