Tidying script indentations

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Duncan
Posts: 13
Joined: Wed Feb 25, 2009 4:25 pm
Contact:

Tidying script indentations

Post by Duncan » Fri Mar 27, 2009 7:33 pm

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?

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Tidying script indentations

Post by sturgis » Fri Mar 27, 2009 7:38 pm

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?

Duncan
Posts: 13
Joined: Wed Feb 25, 2009 4:25 pm
Contact:

Post by Duncan » Fri Mar 27, 2009 8:52 pm

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.

Post Reply