3 ms·
Tabs for indentation, spaces for alignment. You wouldn't need to customize anything, it would look good at all tab widths and people who prefer 2 space sized i
by martin-t 9y ago
Tabs for indentation, spaces for alignment.
You wouldn't need to customize anything, it would look good at all tab widths and people who prefer 2 space sized indents would be able to use that in their editors.
Actually, it could be even better, we could use tabs for aligning to tables too if editors supported elastic tabstops [0]. Unfortunately, the only ones that do don't support other essential features like saving when they lose focus.
Please note that i disagree with how the example aligns function params. The space/tab there looks bad and params should be aligned with spaces using a formatting tool (which every sane language should have).
Or, y'know, scratch that, why don't we commit the AST (enhanced to include comments and other hints like blank lines) to git and let everyone use their formatting.
</rant>
[0]: http://nickgravgaard.com/elastic-tabstops/ http://nickgravgaard.com/elastic-tabstops/