Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That everybody else uses spaces?


If the file uses tabs, at least you can choose to display the indentations as 2 spaces or 4 spaces.

If the file uses spaces, you don't get to choose.


This is my reason for preferring tabs. Plus changing indent levels is faster via arrow keys.


The main reason for preferring spaces is wrapping complex calls split across lines. (Of which there is a lot in some languages such as obj-c or JavaScript.) We just went through the whole tabs vs spaces debate on a new project here with, I think, open minds and a general preference for tabs, and ended up using spaces. The alternative was tabs for basic indentation and spaces for line wrapping but that's too hard to maintain.

YMMV


And even faster using tab or shift+tab to pop up or down a level, regardless of whether you're using tabs or spaces.


I do this too, along with Home/End to navigate. Once in a while though I want to move only half way left of the indent, which is one press on tab, 2-4 of space. Can't use ctrl+left there.

But more than anything I'm sure it's just familiarity.


Any reasonable editor can be configured to jump multiple spaces at a time.




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

Search: