Misplaced and unmatched brackets are one of the most common syntax errors encountered when writing code. jEdit has several features to make brackets easier to deal with.
Positioning the caret immediately after a bracket will highlight the corresponding closing or opening bracket (assuming it is visible), and draw a scope indicator in the gutter. If the highlighted bracket is not visible, the text of the matching line will be shown in the status bar. If the matching line consists of only whitespace and the bracket itself, the previous line is shown instead. This feature is very useful when your code is indented as follows, with braces on their own lines:
public void someMethod() { if(isOK) { doSomething(); } }
Invoking
C+]
) or
clicking the scope indicator in the gutter moves the caret to the
matching bracket.
C+[
) selects all
text between the closest two brackets surrounding the caret.
Holding down Control
while clicking the scope
indicator in the gutter or a bracket in the text area will select all
text between the two matching brackets.
C+e C+[
)
moves the caret to the previous opening bracket.
C+e C+]
) moves
the caret to the next closing bracket.
Bracket highlighting in the text area and bracket scope display in the gutter can be customized in the the section called “The Global Options Dialog Box”.
and panes of the > dialog box; seejEdit's bracket matching algorithm only checks syntax tokens with the same type as the original bracket, so for example unmatched brackets inside string literals and comments will be skipped when matching brackets that are part of program syntax.