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 - CTRL-[ is partially supported in Ruby
Summary: CTRL-[ is partially supported in Ruby
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks: 179047
  Show dependency tree
 
Reported: 2009-05-13 23:54 UTC by praful
Modified: 2011-01-28 20:13 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.