This works for removing trailing whitespace in NetBeans 8.0 (Mac version):
NetBeans > Preferences > Editor > On Save > Remove Trailing Whitespace From: All Lines
Make sure you have:
Language = PHP
And you may need to deselect:
[ ] Use All Languages settings.
It was not at all obvious to me that this might be under On Save.
You have to at least perform a dummy edit then save the file for it to work.
NetBeans still seems to introduce the whitespaces on an empty next line
or empty documentation line sometimes on [ENTER]/[RETURN], but at
least it gets removed on save.
© Copyright 2001 - 2016 Webel IT Australia (ABN: 67 677 268 579). All rights reserved (except as specified below).
PHP code examples from Webel IT Australia on this site are distributed under the GNU General Public License.
Excludes text and code snippets from Drupal.org quoted for educational purposes.
Drupal’s online documentation is © 2000-2014 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0.
PHP code from Drupal.org is distributed under the GNU General Public License.
Drupal® is a registered trademark of Dries Buytaert.
Text quoted from Wikipedia for educational purposes is made available under the Creative Commons Attribution-ShareAlike License.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Site developed by Webel IT Australia.