For Java, pressing the CTRL-[ key combination results in one of the following types of behaviour:
1. If you put the cursor before a block, pressing CTRL-[ moves the cursor to the first right closing block character and
highlights the opening block character.
2. If the cursor is in a block, pressing CTRL-[ moves the cursor to the first left open block character and highlights
the matching closing block character.
3. If the cursor is on a block character, it goes to the matching block character (open to close or converse).
A block is text delimited by a character or keyword eg brackets or if statement.
For Ruby only (3) occurs. Please implement 1 and 2. This would be especially useful because the Vim plugin (jVi) relies
on this behaviour to implement the smart range (%) key.
jVi makes full use of NetBeans' "Editor Braces Matching" API as described in
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/overview-summary.html . jVi reprograms
the behavior depending on whether input or command mode. That doc says, under "Usecase 3. - Different search scenarios",
that jVi uses C. and D. It probably did originally, I forget, to mimic vim exactly and was changed to use E. and F. to
extends vim's behavior.