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

Summary: Support good whitespace handling in the editor
Product: editor Reporter: _ sandipchitale <sandipchitale>
Component: Formatting & IndentationAssignee: issues@editor <issues>
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

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 ***