Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MashPotato on Sun 17/12/2006 01:18:13

Title: Automatic formatting of code (SOLVED)
Post by: MashPotato on Sun 17/12/2006 01:18:13
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 ^_^
Title: Re: Automatic formatting of code
Post by: Ashen on Sun 17/12/2006 01:24:12
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.)
Title: Re: Automatic formatting of code
Post by: MashPotato on Sun 17/12/2006 01:37:25
Thanks Ashen ^_^  I think I have a bad habit of pressing "down" instead of "enter", so sometimes the formatting doesn't kick in ::).