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 72528 - Remove trailing spaces
Summary: Remove trailing spaces
Status: RESOLVED DUPLICATE of bug 13063
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@editor
Depends on:
Reported: 2006-02-10 15:07 UTC by andersborg
Modified: 2008-08-21 11:28 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description andersborg 2006-02-10 15:07:47 UTC
I've found that the editor doesn't remove trailing spaces in lines even when
saving the source file. Trailing spaces have absolutely no significance, but can
cause trouble when printing etc, so I would recommend they are removed.
Comment 1 Martin Ryzl 2006-02-10 16:52:33 UTC
well, we've been trying to avoid unnecessary changes since those may cause
conflicts in version control systems. you are making a valid point though so I
guess it will require feedback from other as well
Comment 2 Lukas Hasik 2006-06-23 14:50:08 UTC
moving to mobility component
Comment 3 ieising 2006-08-16 08:40:13 UTC
There is a module "Remove Whitespace" which I think accomplishes exactly what is
being asked for. If I remember correctly there was some mentioning of
implementing in the module an option to invoke this feature upon saving a file.
Guess it would solve the issue.

Comment 4 Lukas Hasik 2006-08-16 09:50:51 UTC
the module is described here
Iwan, thank you for pointing it out.

I think that it's more general issue therefore I'm reassigning to editor.
Comment 5 rasto1968 2006-10-20 09:45:28 UTC
Please add an option to do this on saving a file. My actions when saving a file
now consist of:
1. Remove Trailing Spaces
2. Fix Imports
3. Organize Imports
It would be great if there was some way to automate this. I guess I could define
a keyboard macro, but it just strikes me as something that the editor could be
doing for me.

I agree that the option needs to be defaulted to off for those that don't want
it messing with version control.

Comment 6 keeleyt83 2007-12-21 22:27:22 UTC
I would like to see this too or at least the ability to set a macro to it. Right now, you can't record a macro that
contains a save action.
Comment 7 Vitezslav Stejskal 2008-08-21 11:28:21 UTC
Fixed in 6.5, see issue #13063.

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