4 ms·
Here's one: when your code has no tabs, it's very obvious that whitespace is just a bunch of spaces. With tabs, it's harder to say, especially when mixed. It's
by bpchaps 7y ago
Here's one: when your code has no tabs, it's very obvious that whitespace is just a bunch of spaces. With tabs, it's harder to say, especially when mixed. It's one less thing to think about.
- _bxg1 7y agoI'm 100% on board with not mixing them and making sure everyone on the team is on the same page. But that's a red herring; it can easily be remedied with linters/editor settings. The same is true for preventing tabs.
- bpchaps 7y agoEh, not really. A string with a tab is still hard to tell apart from a string with spaces. Linters don't help there (why would they?). And no way in hell am I going to change Vim to display them differently!
- _bxg1 7y agoMy linter (eslint) underlines any whitespace that mixes tabs and spaces. My editor (VSCode) notifies me if I open a file that has any mixed tabs and spaces and offers to fix them all with one click. > no way in hell am I going to change Vim to display them differently! Sounds like we've found the problem.
- IshKebab 7y agoNearly all editors have some kind of "show whitespace" option now.