Indentation of code
One thing that I’ve always taken for granted how to do is the indentation of code. Sure, people place characters like { either on the same line as the CSS rule/JavaScript function name, or on the following, and that’s just fine. But what I mean here is how to accomplish the actual indentation.
Let’s take these two simple code examples:
.make-pretty{
color: pink;
}
function createWeb_2_dot_0_app(){
/*
Insert superfluous AJAX calls together
with an abundance of tagging all over...
*/
}
Ok, all fine so far. But, and here lies the question: how do you make, for example, the code color: pink; to be placed further to the right than the line above? “Huh?!”, you say. Ok, I mean, how do you indent it. “Oh, that’s easy, I press the Tab key”. To me, that has been the most given answer too.
But I’ve recently learned that a number of people don’t use the Tab key, but instead press the Space bar a number of times (like, 3) to indent it. I would never use any formatting like that, since it just makes it a lot harder to get consistent indentation throughout the code. Also, with a lot of code, all those extra whitespace characters will in the long run lead to an increased file size.
So, I beg of you: if you use the Space bar to indent code, please re-think. For me. Please.


