Scripting Guide > Scripting Tools > Using the Script Editor > Match Parentheses, Brackets, and Braces
Publication date: 10/01/2019

Match Parentheses, Brackets, and Braces

The script editor helps you match fences (or parentheses, square brackets, and curly braces) in the following ways:

The matching closing fence is added when you type an opening fence.

When you place your cursor next to either an opening or closing fence, the fence and its match are highlighted in blue. If the fence does not have a match, it is highlighted in red.

If you double-click a fence, everything between the matching fence is selected (including the fences).

If you put your cursor within an expression and press Ctrl-] on Windows (COMMAND-B on macOS), the entire expression is selected. Fences that enclose the expression are included. Repeat this process to highlight the next-higher expression. Figure 4.6 shows an example.

Figure 4.6 Each Step in Matching Fences 

When you type an opening brace, JMP adds the closing brace. Enter code between the braces, type the closing brace, and then your cursor automatically moves after the closing brace that JMP added. This prevents you from accidentally adding an unnecessary closing brace.

You can turn on and off the auto completion of braces in the JMP preferences. See Set Preferences for the Script Editor.

Want more information? Have questions? Get answers in the JMP User Community.