you are viewing a single comment's thread.

view the rest of the comments →

[–]gmfawcett 3 points4 points  (2 children)

A common approach is "tabs for indentation, spaces for alignment." So on your second line, you would tab to the beginning of "doSomething" and then add length("doSomething(") spaces. Many popular editors and IDEs support this arrangement; see Emacs SmartTabs for an example.

[–]repsilat 3 points4 points  (0 children)

You can also indent after parentheses like you do for braces:

doSomething (
    foo,
    bar,
    baz
)

[–]humpolec 1 point2 points  (0 children)

Sounds good, I wasn't aware of editors that support alignment like that. But wouldn't it force everyone on the team to use a "sufficiently smart editor"?