I'm too lazy to type spaces.
The tab-stop value needs to be at least 4 or my brain won't notice any indentation - i blame this tiny monitor with an absurd resolution.
Tabs or Spaces to indent code?
Tabs make for faster editing (because of faster navigation), but forums frequently don’t handle them well and much of what I code ends up being posted, and the difference is size is not significant, so I use only spaces. I actually do use the tab key to indent and add spacing, I just keep my editor set to expand tabs to spaces.
Last edited by MichaelW on Sep 22, 2007 9:02, edited 1 time in total.
-
- Posts: 1706
- Joined: May 27, 2005 6:34
- Location: Cambodia, Thailand, Lao, Ireland etc.
- Contact:
I dislike tabs because most people using tabs actually use a mixture of tabs and spaces, (including some of the above who profess to prefer tabs) and it is horrible to correct when your code editor is set up differently.
I solve the problem by using a code formatter what provides consistent formatting throughout, regardless of what I type; with a good code formatter, it makes no difference.
And that reminds me, I need to update my code formatter, it is one year out of date.
Garvan
I solve the problem by using a code formatter what provides consistent formatting throughout, regardless of what I type; with a good code formatter, it makes no difference.
And that reminds me, I need to update my code formatter, it is one year out of date.
Garvan
I use the tab key to make indents, but my editor is always configured to insert spaces instead of actual tab characters. When loading in files containing tabs, my editor is also instructed to convert all tabs to exactly three spaces.
I've always liked spaces. The disk space argument is relatively moot these days; a few extra K or M of spaces isn't a serious problem. I've also always disliked tabs because when viewing other people's code, it can look god-awful if they've used actual tab characters, and Sisophon2001 is correct - many programmers will use mixes of tabs and spaces, making it even more unorganized.
I'm obsessed with computer cleanliness; what can I say?
I've always liked spaces. The disk space argument is relatively moot these days; a few extra K or M of spaces isn't a serious problem. I've also always disliked tabs because when viewing other people's code, it can look god-awful if they've used actual tab characters, and Sisophon2001 is correct - many programmers will use mixes of tabs and spaces, making it even more unorganized.
I'm obsessed with computer cleanliness; what can I say?
-
- Posts: 1759
- Joined: May 23, 2007 21:52
- Location: Cut Bank, MT
- Contact:
Spaces, always. Like everyone else: tabs are different in different text editors, they screw up easily, and I've even used a text editor that converted it to spaces! Worse, though, is when it's *not* converted to spaces, because it's just plain weird. Each editor handles tabs differently.
I basically indent two spaces. It feels right, one space is not enough and more would be too much. Never mind the fact that it's been a habit since my QBasic and Pascal days...
I basically indent two spaces. It feels right, one space is not enough and more would be too much. Never mind the fact that it's been a habit since my QBasic and Pascal days...