When editing long documents or complex applications, you can hide text and code blocks so that you can focus on just a portion of the content. A customizable marker displays the first few characters of the collapsed selection.
To set any of the following collapsing text options, select Options > Settings > Editor > Collapsed Text:
- Customize the appearance of the collapsed text marker, including the font, foreground and background colors, and set the amount of text to display inside the marker. The number of characters actually displayed in the marker might vary if a proportional font is used.
- Enable a popup display of the full text when you mouse over a collapsed text marker. You can set the maximum number of lines to display in the popup box.
- Enable the automatic selection of text when a collapsed text section is expanded. This lets you expand a collapsed region and then easily collapse it again.
- Set file save and file open options for the collapsed text.
To collapse text in the current document, do one of the following:
- Select text then click one of the collapse buttons (-) which display in the gutter.
- Select Collapse selection from the right-click popup menu.
- Select Collapse Tag from the right-click menu to collapse the entire contents of the tag.
- Select Collapse All Identical Tags from the right-click menu to collapse all tags which are the same as the current tag, including nested tags.
- Click on the blue plus sign <+> at the top of the Tag Inspector pane to collapse the text based on the current Tag Inspector outline.
To work with collapsed text:
- To expand the text, double-click a collapsed text marker.
- To expand all collapsed text, right-click anywhere in a document and select Expand All from the popup menu.
You can drag collapsed text just like regular text blocks.
Collapsed text blocks can be nested within each other.
When you run a search operation or check spelling, collapsed text expands if a match or misspelling is found within the collapsed section.