This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 165120

Summary: CTRL-[ is partially supported in Ruby
Product: ruby Reporter: praful <praful>
Component: EditingAssignee: issues@ruby <issues>
Status: NEW ---    
Severity: blocker CC: err
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 179047    

Description praful 2009-05-13 23:54:28 UTC
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.

Thanks

Praful
Comment 1 err 2009-05-14 02:24:47 UTC
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.