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 59884 - Support good whitespace handling in the editor
Summary: Support good whitespace handling in the editor
Status: RESOLVED DUPLICATE of bug 13063
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@editor
Depends on:
Reported: 2005-06-13 01:45 UTC by _ sandipchitale
Modified: 2007-11-05 13:39 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description _ sandipchitale 2005-06-13 01:45:49 UTC
I find that while editing in NetBeans my source code lands up with a lot of 
trailing whitespaces in my source code. This partly happens because of auto 
indent functionality. I would like to see the following features in the editor:

1. Ability to show hide leading and trailing whitespaces. Show the spaces and 
tabs differently - distinct color highlight or some faint background symbol.

2. Ability to configure the backspace such that if pressed in the leading 
whitespace, deletes all the leading whitespaces. The cursor is left at the 
beginning of the line. If pressed again remove the preceding blank lines as 
well as trailing spaces of the preceding non-blank line. A feature like this 
exists in Emacs and is called hungry delete mode e.g.
Comment 1 _ sandipchitale 2005-06-13 19:37:52 UTC
Another instance of extraneous whitespace is the case of blank lines 
separating the blocks of code. For example:

Start with:

    // block 1
    if (condition) {

When I type ENTER after closing } of if the cursor is one the next line the }. 
This is correct behaviour of indentation. However if I hit enter again to 
start another block the indentation is not deleted.

    // block 1
    if (condition) {
    <ENTER>   <---- indentation not deleted
    // block 2

The indentation engine could be smart about detecting this and delete the 
whitespace on block separating blank lines.
Comment 2 Jesse Glick 2005-06-16 18:12:15 UTC

*** This issue has been marked as a duplicate of 13063 ***