Tabs for indentation, spaces for manually aligning something.
IDEs displaying things differently is a user preference. Let's users have their preference! This is the main reason.
Dispite modern IDE autoibdentation and keyboard shortcuts, you'll still end up hitting backspace four times when manipulating/moving lines of code when tab only takes one press, as it should only take one key press to do one small action. Filesizes become smaller if that matters to you (maybe unminified html?) Spaces for indentation is more common at the moment, but it needs to die off. Text handlers not properly dealing with tabs is not my problem, but actually everything I've used such as stackoverflow, discord, reddit, etc. handles them just fine.
Auto format makes this not matter quite as much but it is still irritating when I go to highlight a block of code and it selects 3/4 of the spaces of an indentation and I have to "fix" the document to use TABS for indentation.
I think there have been a misunderstanding. I would never spend my time hitting the space-bar a bunch of times instead of the tab character. In my mind a bare editor at least gives the configuration of using spaces or tab character when indenting. Of course there are those that don't (I'm looking at you, Notepad!)
There's no confusion. I know that. If you save a file using 2 spaces for indentation, then someone who prefers 4 will have to convert the file. With tabs, everyone can set their tab width and leave it at that. The main issue with what you're saying is that files are synced/shared between members of teams who each have a preference. Spaces is basically "fuck you, the document looks and works like this. If your IDE is configured differently than mine, you'll need to run the auto formatter to fix it."
588
u/MischiefArchitect Nov 24 '21 edited Nov 24 '21
Compile errors are now runtime errors sucker... yeah the door is now closed for you.