I've noticed that most of the HTML/XML/HAML that gets generated from plugins uses 2 spaces instead of 1 tab. I use textmate and have tabs set to 4 spaces for HAML/HTML/XML and 2 spaces for Javascript/Ruby, but I only have to press the tab key once to get nice indentation. Pressing the space bar twice and delete twice seems like too much work :p.
Do you manually type two spaces, or is some middle layer converting tabs to two spaces? Or do just a few of you use tabs?
The default value for the tab-size property is 8 space characters, and it can accept any positive integer value.
If you represent the indents using space characters (ASCII SP), then 2 spaces is 2 characters fewer than 4 spaces. If you allow TAB characters to be used, then (on Windows) a TAB indents by up to 4 spaces, so TAB characters result in fewer characters.
Standard paragraph indentation is about five spaces or one-quarter to one-half of an inch, depending on which style guide you follow.
For example if you start off using four spaces for an indent, then you should always use four spaces. In the example below, four spaces have been used for the first indent, but only two for the second, and you can see that as a result the code doesn't “line up”. phrase = input("Talk to me > ")
2 spaces is generally agreed-upon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With