Matching Delimiters

Home Page (Text Editor)OverviewHow Do I ... TopicsFAQReference

Source code is often grouped using delimiters such as (), {}, and []. These groupings are called levels. You can navigate these levels using the LevelUp and LevelDown commands. The editor understands nested levels, and matches the correct delimiter even if the level spans several pages and itself contains many levels.

The editor also provides the command GoToMatchBrace, which allows you to jump quickly between the start and end of a level. The GoToMatchBraceExtend command extends the selection to the start or end of a level, instead of moving the cursor.

What do you want to do?

Search forward for a matching level

Move to a matching brace

Select code between the start and end of a level

To search forward for a matching level

  • Press the LevelDownkey combination.

    The command begins searching for one of the left-side delimiters, which are (, {, and [. When the left-side delimiter is found, the cursor is positioned at the matching right-side delimiter. If a matching delimiter cannot be found, the editor beeps.

To move to a matching brace

  1. Place the insertion point immediately in front of a brace.

  2. Press the GoToMatchBracekey combination.

    The insertion point moves forward or backward to the matching brace. Choosing the command again returns the insertion point to its starting place. If a matching brace cannot be found, the editor beeps. This method also works for parentheses, angle brackets, and square brackets.

To select code between the start and end of a level

  1. Place the insertion point immediately in front of a brace.

  2. Press the GoToMatchBraceExtendkey combination.

    The insertion point moves forward or backward to the matching brace, and all the code between the braces is selected.