How to show/reveal hidden or invisible characters in NetBeans?

NetbeansWhitespace

Netbeans Problem Overview


How can you show/reveal hidden characters in NetBeans? In other editors, if this feature is turned on, a space might be shown as a small centered dot, and a tab as a right arrow. (This feature is useful to see if a file uses tabs or spaces for indentation, among other things.)

Netbeans Solutions


Solution 1 - Netbeans

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.0.1

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.1.0

NetBeans 7.4.0 fixes this:

NetBeans 7.4.0

There're yet a couple of issues:

  1. 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.

  2. 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.

Solution 2 - Netbeans

in netbeans 7 you can enable display of spaces, tabs & line feeds like this:

spaces
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

Solution 3 - Netbeans

Using Netbeans 8.0.1

View-> Show Non-Printable characters

Solution 4 - Netbeans

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!

Solution 5 - Netbeans

View -> Show Non-Printable characters

enter image description here

Solution 6 - Netbeans

Using Netbeans 7.3.1,

View -> Show Non-Printable characters

I can see white-spaces, tabs, and carriage returns.

Solution 7 - Netbeans

This feature has finally been added and is available in NetBeans 6.10. Since this has not been released yet, you can try out 6.10 MileStone 1: http://bits.netbeans.org/netbeans/6.10/m1/. I look forward to the final release!

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmjsView Question on Stackoverflow
Solution 1 - NetbeansÁlvaro GonzálezView Answer on Stackoverflow
Solution 2 - Netbeansc33sView Answer on Stackoverflow
Solution 3 - NetbeansGihan ChathurangaView Answer on Stackoverflow
Solution 4 - NetbeansMaxView Answer on Stackoverflow
Solution 5 - NetbeansNanhe KumarView Answer on Stackoverflow
Solution 6 - NetbeansSohel KatchiView Answer on Stackoverflow
Solution 7 - NetbeansQuad64BitView Answer on Stackoverflow