/tech/, I don’t understand the benefit of 4 spaces or at the very least how to make myself efficient with spaces. FWIW, I’m using vim, and here are some scenarios. A lot of these are probably because of how much I am used to tabs:
>I’m doublechecking the nesting.
>Holding down that ‘j’ key.
>Oops, I hit a line with a comment in it.
>With tabs, I’m probably going to remain vertically aligned in the correct place.
>With spaces, HAHA YOU’RE FUCKED.
>How deeply nested am I again?
>’0’, count the number of times I press ‘l.’
>with spaces I press it four times as much.
>>Actually, I don’t even do that, I can press ‘V’ and since the highlighting indicates individual characters in a different color than the space inbetween tab characters, I can visually see the nesting number at the beginning of the line.
>I need to close these two loops.
>Just delete two tabs.
>With spaces, go back 8 times…then notice every once in a while I missed a key because the nesting didn’t line up with things previously.
>I move to a new system without all my custom configs because of temporary reasons.
>No matter, typing in a tab isn't that onerous.
>Press enter after a typical nesting character like ‘{‘.
>It automatically indents, but in this case I don’t actually want to indent (yes, there are reasons for wanting this).
>I just press backspace once. Good luck in 4 space land.
Just, in general, what I like about tabs is that it automatically delineates nesting very easily when editing, and it saves on key spaces. If I forget how deeply nested I am, I can see the number of tabs in the beginning, I don’t have to count spaces and divide by 4. There are times where I want to go not just to the beginning of the line, but to a specific nesting number (for example, if I decide to close a loop or tag or what-have-you).
Those of you who use 4 spaces: fucking how? Do you never nest or use loops in your code ever? Are you so obsessed with coding smells that you refuse to nest or something; is that how you deal with the inefficiency? Do you have some crazy assembly of auxiliary code that essentially makes 4 spaces act like tabs(*)? How do you live with yourselves at night? Do you really love your wife’s son, or do you just deal with him?
(*) The only piece of auxiliary code I have is one that changes 4 spaces to tabs while I’m editing, and back to spaces before I save the code again. So I don’t run into these minor irritations while coding.