Skip to content

Code Folding

Large diagrams can be difficult to navigate. Code folding lets you collapse sections of your diagram to focus on what matters.

Look for the minus icon (-) in the editor gutter (the gray area to the left of line numbers). Click it to collapse that section.

To expand a collapsed section, click the plus icon (+) that appears in its place.

  • Collapse current section: Ctrl+NumPad- (Windows/Linux) or Cmd+NumPad- (macOS)
  • Expand current section: Ctrl+NumPad+ (Windows/Linux) or Cmd+NumPad+ (macOS)
  • Collapse all: Ctrl+Shift+NumPad- (Windows/Linux) or Cmd+Shift+NumPad- (macOS)
  • Expand all: Ctrl+Shift+NumPad+ (Windows/Linux) or Cmd+Shift+NumPad+ (macOS)

Different diagram types have different foldable sections:

  • Flowcharts - Subgraphs
  • ER Diagrams - Entity blocks
  • State Diagrams - State blocks and composite states
  • Class Diagrams - Class definitions
  • Sequence Diagrams - Loop, alt, opt, and other blocks
  • Gantt Charts - Sections
  • Collapsed regions show a summary of their contents
  • Folding state is preserved when you close and reopen a file
  • Use Expand All before searching to ensure all content is visible