3 ms·
Virtually everyone does type one tab and uses a text editor that expands the tab to four spaces in the file.
by jdboyd 10y ago
Virtually everyone does type one tab and uses a text editor that expands the tab to four spaces in the file.
- jfoster 10y agoYep. I've never really understood why editors tend to replace the tab with spaces, though. It seems to work pretty much the same when indenting, but involves more backspacing and introduces more potential for error (eg. deleting 3 spaces instead of 4) when deleting. What is the advantage that spaces have over tabs?
- BerislavLopac 10y agoThey ensure uniformity regardless of how your editor is set up. E.g. the default vim setting is to display tabs as eight spaces, which means that viewing a file with tabs (or, even worse, a mixture a tabs or spaces) will look differently if viewed on a newly-set server than in my regular IDE (which is set to display a tab as four spaces).
- andkenneth 10y agoAtom at least treats soft tabs as tabs for the most part, when you backspace into a soft tab it will delete all 4 spaces at once.