[–] smt88 10y ago ↗ Tabs for indentation, spaces after that for alignment (aka "smart tabs").But it almost doesn't matter at all. Almost.
[–] minimaxir 10y ago ↗ Vouching for this, since it's a plot point in the latest Silicon Valley episode and not a random request of preference.
[–] benologist 10y ago ↗ In 2016 I think the best approach is pick a formatter (gofmt-alikes 'standardjs' etc) run it on save and not think about it anymore.
[–] hulahoof 10y ago ↗ I have my tabs set to 3-4 spaces - nothing is more annoying than opening in a program with a long default tab.. spaces preserve the format better across systems IMO
[–] brador 10y ago ↗ Imagine doing it 1000 times. That's 3000-4000 space presses or 1000 tabs. RSI is not fun. [–] smt88 10y ago ↗ The IDE/editor takes care of that. But I still like tabs.
[–] rffn 10y ago ↗ Spaces.The right amount is inserted by autoindent or by setting tab width to the desired value and hitting tab then.
[–] eip 10y ago ↗ Tabs. Obviously.You can set pretty much any editor to display tabs as whatever amount of indent you want. Harder to do that with spaces.Also spaces = tons of unnecessary button pushing.
9 comments
[ 4.1 ms ] story [ 29.3 ms ] threadBut it almost doesn't matter at all. Almost.
You can set pretty much any editor to display tabs as whatever amount of indent you want. Harder to do that with spaces.
Also spaces = tons of unnecessary button pushing.