Using Outlining to Make Scripts Easier to Read

by Apr 11, 2013

ISE 3.0 features automatic outlining, so structures like braces can be collapsed or expanded by clicking the small "+" or "-" symbols next to them.

To quickly collapse or expand all outline, press CTRL+M. Collapsing all outlines can be useful to get a quick overview and better display the script structure of long scripts.

You can create your own collapsible regions by using the keywords #region and #endregion. These keywords MUST be lowercase and cannot contain a space between "#" and the keyword:

#region Initialization Stuff
$a = 1
$b = 2
#endregion Initialization Stuff

Optionally, you can add a description. To better understand where a region starts and ends, it is recommended to add the same description to both statements.

Twitter This Tip! ReTweet this Tip!