The Dink Network

Reply to Enable code folding.

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 26th 2012, 05:18 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
A small but useful addition to this excellent file is code folding: Collapsing/uncollapsing code between matching { and } to a single line. This can be especially useful when editing scripts with lots of if-statements in it, so the bits you don't care about for the moment are hidden.

To do this, go to View->User-Defined Dialogue..., select DinkC from the drop-down menu. On the "Folder & Default" tab, enter "{" (but without quotes) in the textbox of "Folder Open Keyword Settings", and "}" (again, without quotes) in the textbox of "Folder Close Keyword Settings.

Your DinkC scripts will now have boxes with minus signs in front of opening brackets. Clicking those will collapse the code between that line and the matching closing bracket to a single line. Clicking it again (though it has now changed into a plus sign, similar to how directory trees display subdirectories) will uncollapse the code.