Hacker News new | past | comments | ask | show | jobs | submit login

All it’s missing is ‘set expandtab’ ;-)



Noo I like tabs! Maybe you can explain to me, I genuinely do not get why people are religious about spaces instead of tabs. You have to backspace more times to get rid of an indent!


<< to get rid of an indent. People are religious about this because if you use a shiftwidth (or sts) different than your ts, you end up with a mixture of tabs and spaces. If you change your ts to something other than 8, then you end up with code that looks weird on everybody else's screen.


Tabs are better in theory, obviously.

However people insist on using spaces. Like between words in sentences or between tokens in a line of code.

Spaces are better than mixing tabs and spaces, especially with "modern" (newer than 30 years old) tools. Especially if you use these editors enough that you are never indenting manually with backspace or tab/spacebar.

So the options are tabs+spaces mixed together or just spaces unless you are dealing with tab delimited files with no spaces in them, which is rare.

The tradeoff is you lose the ability for different people working on the same thing to see different indentation levels. In exchange you don't regularly get your formatting confusing messed up because of some kind of invisible control character confusion.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: