Hacker News new | ask | show | jobs
by PaulDavisThe1st 333 days ago
the correct rule is: tabs to indent, spaces to align

[TAB][TAB][TAB]ShortTypename[SPACE][SPACE]variable_name

[TAB][TAB][TAB]LongLongLongTypename[SPACE]variable_name2

ps. the [SPACE] counts above are illustrative, not accurate.

3 comments

The correct rule is: you shouldn't align.
The code I maintain (Emacs Lisp) follows that rule.
Exactly, just have your linter error out if there's a tab following a space
And ever stronger if a space follows a tab..!
That's how you do alignment (in indented parts)
Just imagine pressing the space bar 12 times for each line, or having to use :vimq! to handle that without going crazy