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 197253 - Extend behaviour of CamelCase to underscore entities as well
Summary: Extend behaviour of CamelCase to underscore entities as well
Alias: None
Product: editor
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal with 4 votes (vote)
Assignee: Jan Becicka
Depends on:
Reported: 2011-03-31 00:44 UTC by normadize
Modified: 2018-02-15 17:22 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Example of underscore caret navigation (50.08 KB, image/png)
2013-01-14 19:19 UTC, markiewb

Note You need to log in before you can comment on or make changes to this bug.
Description normadize 2011-03-31 00:44:12 UTC
Hi Petr,

It would be nice if the CamelCase behaviour of the editor (ctrl+left/right, ctrl+del, ctrl+backspace etc) was extended to support underscore_defined_words as well :). Many devs, myself included, use underscores for things like constants or plain variables and StudlyCaps/CamelCase for classes, methods and objects.

Comment 1 markiewb 2013-01-14 19:19:17 UTC
Created attachment 130202 [details]
Example of underscore caret navigation
Comment 2 johnnybaloney 2015-08-13 15:05:44 UTC
NetBeans IDE 8.0.2 (Build 201411181905)

In the following example the places where underscores are recognised as word separators are the VAR_FOO_BAR variable name and the BOO_HOO part of the method name. Interestingly "FOO_BAR" string is treated as one word.

    private void test_foo_bar_BOO_HOO() {

        String var_foo_bar = "foo_bar";
        var_foo_bar += "foo_bar";

        String VAR_FOO_BAR = "FOO_BAR";
        VAR_FOO_BAR += "FOO_BAR";
Comment 3 johnnybaloney 2015-08-13 15:25:09 UTC
Another bit of rationale behind this request. I personally tend to write test method names using snake case rather than camel case because they are often long and:




Being able to jump between words when using snake case would be very helpful for me here.
Comment 4 kwfinken 2015-08-13 19:45:46 UTC
I would appreciate this option as well.  Many of the programs I work on were developed with an _ as the standard way of separating words, it would make things much easier, without harming any other users.  Should be fairly easy to implement.
Comment 5 kwfinken 2015-09-01 20:22:59 UTC
the underscore notation is used extensively in Drupal programming.  Netbeans is gaining a reputation in this community, but it could be hindered if people find this frustrating.
Comment 6 Martin Balin 2016-07-07 07:26:55 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 7 markiewb 2016-07-10 18:08:30 UTC
Still valid in 8.2 dev 
Product Version: NetBeans IDE Dev (Build 201607100002)
Comment 8 Christian Lenz 2018-02-15 17:21:54 UTC
I will close it, because it will handled now at the JIRA board: Please discuss it there for further information.

Maybe as a subticket or so.