Page 1 of 1

Tidying script indentations

Posted: Fri Mar 27, 2009 7:33 pm
by Duncan
My constant experimentation (random cutting and pasting :wink: ) leaves my scripts looking rather ragged - particularly with several nested levels of indentation. Is there anyway to force all the on/end, if/end if etc. pairings to match up neatly?

Re: Tidying script indentations

Posted: Fri Mar 27, 2009 7:38 pm
by sturgis
Hit the tab key.
Answer snitched from http://forums.runrev.com/phpBB2/viewtopic.php?t=2835
Duncan wrote:My constant experimentation (random cutting and pasting :wink: ) leaves my scripts looking rather ragged - particularly with several nested levels of indentation. Is there anyway to force all the on/end, if/end if etc. pairings to match up neatly?

Posted: Fri Mar 27, 2009 8:52 pm
by Duncan
Synchronicity! :o

Ah! The user guide does indeed say "When typing press tab to manually format the script." It seems that you need to hit tab inside each handler rather than it reformatting the whole script but that will do for me. Thanks.