Outlining
Outlining provides a way to hide detail in your code until you want it.
Outlining in the Template Editor is of two types: automatic and manual. By default, Generator automatically creates outline blocks for every script block, property, enumeration, and object in your code. You can disable automatic outlining from the Outlining submenu of the Edit menu. You can also create manual outline blocks by inserting #region and #endregion (or in VB, #region and #end region) lines in your code.
To collapse an outline block, click the minus sign at the left margin of the block or place the cursor in the block and press Ctrl+M. To expand an outline block, click the plus sign at the left margin of the block or place the cursor in the block and press Ctrl+M.
In this code, Template Editor has automatically created outline blocks for the script block and the function, and the developer has added a manual outline with a region:
Clicking the minus sign to the left of the script block collapses the entire outline, and shows the script block grayed out. If you hover the mouse over the collapsed outline, Template Editor will display a tooltip with the first few lines of the code contained within the collapsed block:
Expanding the script block and then collapsing the region displays the text after the #region keyword:
Expanding the region and collapsing the function displays the function name.