How to show/reveal hidden or invisible characters in NetBeans?
in netbeans 7 you can enable display of spaces, tabs & line feeds like this:
spaces
- download font from: http://netbeans.org/bugzilla/attachment.cgi?id=97902
- install the ttf font
- tools > options > font & colors > Syntax > All Languages > Whitespaces
- choose the installed whitespace font
- more info about the netbeans 6 bug: http://netbeans.org/bugzilla/show_bug.cgi?id=4619
tabs & line feeds
in netbeans 7 you can enable to see non-printable characters:
- view > show non-printable characters
in netbeans 6 only the spaces part works
Using Netbeans 8.0.1
View-> Show Non-Printable characters
This feature was missing for a long time—a feature request was created on November 1999 and it was finally implemented on August 2010 (NetBeans 6.10). You can enable/disable it at "View → Show Non-printable Characters".
Bug history
As of NetBeans 7.0.1, the definition for "non-printable" seems to include tabs and carriage returns but not regular white space char:
NetBeans 7.1.0 finally displays spaces. However, now it has a new bug where consecutive tabs (or tabs & spaces combinations) collapse into one tab:
NetBeans 7.4.0 fixes this:
There're yet a couple of issues:
The end of file is represented with the same symbol as line feeds, thus making it non-obvious to determine whether the file ends with EOL.
Hidden chars are displayed in the same colour as regular text.
These issues have not been addressed so far but they can be sort of mitigated with the Editor Whitespace third-party plugin, which:
- Hides the EOL and EOF markers (which aren't useful anyway).
- Displays other whitespace characters using always the same colour.
Ubuntu 11.10 => Netbeans 7.0.1
The "View → Show Non-printable Characters" mode really not shows whitespaces while font was not installed by me.
Thanks!