Bracket Matching Improvements

Just pushed to SVN, whenever you move the caret over a bracket, you now have the ability to highlight both brackets, not just the matched one.  Some folks find this useful, as the bracket at the caret position will not highlight if they forgot to insert the closing bracket, for example.  It can also be useful to visually identify the scope of a code block.

 

Matching both brackets

Matching both brackets

To further help with scope identification, I hope to implement a standard range painter for the gutter, for C-style languages that use curly braces to denote code blocks.  This range painter would highlight the deepest code block of the caret as you moved around the code.  The basic API for this already exists, and in fact, the Java language support in RSTALanguageSupport uses it to highlight the method the caret is in (if any).  But it would be nice if there was a more generic one for C, JavaScript, C#, etc.

Scope Highlighting in the Gutter with Java Language Support

Scope Highlighting in the Gutter with Java Language Support

One Response to “Bracket Matching Improvements”

  1. [...] Blog Another boring blog about software « Bracket Matching Improvements RSyntaxTextArea 2.0.4.1 Released [...]