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 166450 - Tab adds to spaces (great), backspace only takes one space (bad)
Summary: Tab adds to spaces (great), backspace only takes one space (bad)
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0.2
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 06:53 UTC by k776
Modified: 2015-01-05 10:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description k776 2009-06-03 06:53:39 UTC
As the title says. If you tab too many times, backspace should delete 2 spaces instead of just one (in the case of tabs).
Comment 1 Jiri Prox 2009-06-08 13:38:49 UTC
What are you indentation settings? (tab size, spaces per  indent, expand tabs to space etc...)
Comment 2 Vitezslav Stejskal 2009-06-08 16:06:03 UTC
Pressing <tab> inserts spaces/tabs depending on your indentation settings. Pressing backspace always removes the
character that is on the left hand side of the caret. This is an intentional behavior. If I misunderstood this report
please reopen and explain what the problem is or add steps how it can be reproduced.
Comment 3 kfms 2013-06-26 22:08:20 UTC
I think (but am not sure) this user was having the same problem I am experiencing that led me to this bug report via Google.

Basically, in some other IDEs like Eclipse, if you are using spaces rather than tabs, then hitting backspace at the beginning of a line automatically deletes a tab's worth of spaces (4, 8, whatever the setting is). Netbeans, however, deletes only one space. So if you are used to the Eclipse-style workflow, you hit <tab> once to indent, but hit <backspace>, e.g., 4 times to dedent.

I don't know that this is really a bug any more than Netbeans using Ctrl-E for Elide Line rather than Ctrl-D for Delete Line. The answer, for future Googlers, is to use shift-tab to dedent, which does what is expected.
Comment 4 PunchyRascal 2015-01-05 10:36:56 UTC
Exactly as the previous comment says - the problem is that netbeans don't delete appropriate amount of spaces if indentation is set to spaces when pressing backspace.