Automatic formatting of code (SOLVED)

Started by MashPotato, Sun 17/12/2006 01:18:13

Previous topic - Next topic

MashPotato

This seems like a silly question, but is there a way to automatically format the script such that bracket blocks have different indentations?  I searched and saw it mentioned that there is, but it didn't say how to do it, so I'm not sure if I misunderstood.  I know I can format manually with the tab button, but I was just wondering if there was a quicker way.
Thanks ^_^

Ashen

#1
It should already indent when you press enter after a { anyway (the next line starts a tab further in) and 'outdent' after a } (the line moves back tab / two spaces). You can also select a block of code and indent it all with 'Tab' - you don't have to do each line individually. Beyond that, though, I don't think there's any automatic formatting, perhaps because different people have different styles. (Obviously I could be wrong, but I've never noticed it if it's there.)
I know what you're thinking ... Don't think that.

MashPotato

Thanks Ashen ^_^  I think I have a bad habit of pressing "down" instead of "enter", so sometimes the formatting doesn't kick in ::)

SMF spam blocked by CleanTalk