line tabs in Arduino IDE

I am quite new to Arduino, so I apologize for the seemingly silly question. I write my Arduino code in the provided IDE. I have coded largely in C++ before and have used emacs as my editor. What I noticed in the Arduino IDE is that, for instance, if I write a for loop the tabs for the open and close brackets does not get limited. For instance I can write the following in the IDE

for(int l = 0; l < 10; l++{
//do stuff
                             }

whereas in emacs it would look like

for(int l = 0; l < 10; l++{
  //do stuff
}

Use CTRL-T, or Tools:Auto Format, to take care of that.

Nicely formatted code is the job of the coder, not the IDE. The IDE can help but you have to do it. The Arduino IDE has all kind of auto format tools (auto indent, auto dedent after bracket to make it line up, ctrl+T as a formatting tool, highlight corresponding bracket etc) for you but if you don't use them or ignore then you end up with terrible code like your first example.