Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show SOME invisible/whitespace characters in Eclipse

People also ask

How do I show whitespace characters?

In Visual Studio for Windows, to display whitespace characters (tabs, spaces, etc) you simply press Ctrl + R, Ctrl + W.

How do I show indent lines in eclipse?

5-In your Eclipse IDE, Go to: Window → Preferences → General → Editors → Text Editors → Indent Guide 6-Then enable indent guide checkbox. 7-Enjoy !

How do I show tabs in eclipse?

Check the option " General > Editors > Text Editors > Insert spaces for tabs ": if unchecked, it will display tabs, not space.


Unfortunately, you can only turn on all invisible (whitespace) characters at the same time. I suggest you file an enhancement request but I doubt they will pick it up.

The text component in Eclipse is very complicated as it is and they are not keen on making them even worse.

[UPDATE] This has been fixed in Eclipse 3.7: Go to Window > Preferences > General > Editors > Text Editors

Click on the link "whitespace characters" to fine tune what should be shown.

Kudos go to John Isaacks


Navigate to Window > Preferences > General > Editors > Text Editors

Click on the CheckBox "Show whitespace characters".

enter image description here

Thats all.!!!


I would prefer to keep the "Show Whitespace" button on the toolbar, so that in one click you can toggle it.

Go to Window -> Perspective -> Customize Perspective and enable to show the button on toolbar.

enter image description here


I use Checkstlye plugin for such a purpose. In Checkstyle configuration, I add special regexp rules to detect lines with TABs and then mark such lines as checkstyle ERROR, which is clearly visible in Eclipse editor. Works fine.