jEdit is best suited for editing program source code, and has a large number of features that help when doing so, including bracket matching, various indentation commands, auto indent, and commands for commenting.
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.
If the caret is in front of a bracket, the matching one is highlighted (assuming it is visible on the screen). The bracket highlight color can be changed in the Colors & Styles pane of the Utilities>Global Options dialog box; see the section called The Global Options Dialog Box in Chapter 8, and it can be disabled entirely in the Editor pane of the same dialog box.
Edit>Brackets>Select Code Block (keyboard equivalent: Control-[) will select the code block containing the caret. Double-clicking on a bracket in the text area also has the same effect. A code block is a bracket-delimited range of text.
Edit>Brackets>Locate Bracket (keyboard equivalent: Control-]) will move the caret to the bracket matching the one before the caret.
Edit>Brackets>Go to Previous Bracket (keyboard equivalent: Control-Alt-[) will move the caret to the previous opening bracket. Edit>Brackets>Go to Next Bracket (keyboard equivalent: Control-Alt-]) will move the caret to the next closing bracket.
Figure 6-1. Bracket highlighting in action