Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
613 views
in Technique[技术] by (71.8m points)

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

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...