LogoLumide

Code Folding

Code folding collapses code blocks, imports, and comments to simplify navigation.


Foldable Regions#

Lumide identifies five kinds of foldable regions:

  1. Blocks: Curly braces { ... }, functions, class declarations, and control flow blocks.
  2. Imports: Consecutive import statements at the top of the file.
  3. Comments: Block comments (/* ... */) and multi-line doc comments (///).
  4. Definitions: Multi-line method or property declarations.
  5. Custom Regions: Explicit // #region and // #endregion markers.

Interacting with Folds#

  • Gutter Chevrons: Hover over the gutter next to a line number to reveal the folding chevron (⌄). Click to fold; click the chevron (›) to unfold.
  • Placeholder Click: Click an in-editor collapsed placeholder (e.g. { ... }) to unfold that region.

Vim Mode Fold Commands#

When Vim mode is enabled:

  • za / zA: Toggle current fold or recursive subtree.
  • zc / zC: Close current fold or recursive subtree.
  • zo / zO: Open current fold or recursive subtree.
  • zM / zR: Close all folds or open all folds.

Next Steps#