Folding code blocks

When code folding is enabled, you can expand and collapse code blocks for IFELSE, IF, ELSE, DO, SELECT, WHEN, OTHERWISE, PACKAGE, BEGIN, and PROCEDURE statements.

Before you begin

Code folding is supported in the PL/I Editor only. It is disabled by default. To enable it:
  1. Open the Preferences window.
  2. Navigate to PL/I > Editor.
  3. Select Enable folding of code blocks.
Limitation: Code folding does not work if a file contains parser errors or if tooling is disabled. For more information about tooling, see Getting started with the PL/I Editor.

About this task

The following screen capture shows a block of text that is collapsed, marked by +, and one that is expanded, marked by -.

A PL/I program with code folding

A code block that has only one line of code after the initial line cannot be folded, as in this example:

A code block that cannot be folded