4 ms·
I've never understood the tabs versus spaces argument. It's not really a question of a coder's individual taste, is it? Arent these things usually decided by th
by hellofunk 9y ago
I've never understood the tabs versus spaces argument. It's not really a question of a coder's individual taste, is it? Arent these things usually decided by the choice of IDE?
For example, I use Emacs, and when I press the tab key, it is actually inserting several spaces, not a tab character, at least in the language modes that I use.
- spinningarrow 9y agoBut does everyone you work with use the same editor/IDE? I think that's where problems begin (and are subsequently solved by the introduction of something like editorconfig).
- marcosdumay 9y agoExcept from some niche Windows only tools, I've never seen an editor that defaulted to tabs.
- creepydata 9y agoEclipse defaults to the tab character, at least for Java.
- marcosdumay 9y agoOh... That means I mix tabs and spaces on Java :( I did never notice it.
- pmoriarty 9y agoWhat emacs does when pressing the TAB key is fully configurable, and many people do indeed configure that behavior to their own tastes.
- khedoros1 9y agoI use vim (or vi on some antiquated machines). Others in the company use Emacs, Visual Studio, Qt Creator, Sublime, and so on. When the company was more startup-ish, it was a matter of individual taste, influenced by their IDE/editor. Giant checkins of mostly whitespace changes eventually became an issue, and were banned. Years later, and the code it mostly spaces, but I see places in the code with random tabs in between, every now and then. For my case, vim handles a bunch of auto-format and auto-indent options turned on, and replaces the tab key with 4 spaces, unless I'm editing a Makefile (where commands to execute are preceded by a tab character).
- konart 9y ago>Arent these things usually decided by the choice of IDE? I've yet too see a modern IDE or code editor that wouldn't allow to chose what you want to used for indentation.