182

A long while back I transitioned to doing all my web application development in Eclipse from BBEdit. But I miss one little feature from BBEdit. I used to be able to show invisible characters like tabs but not show other invisibles like spaces. I know that I can bulk turn all of these on in Eclipse, but I wonder if there is a way to show only some invisibles in Eclipse.

tshepang
  • 12,111
  • 21
  • 91
  • 136
bryan kennedy
  • 6,969
  • 5
  • 43
  • 64
  • 56
    Incase anyone in the future lands on this page like I did looking for how to show white space in eclipse it is: Window>Preferences>General>Editors>Text Editors – JD Isaacks Jan 15 '10 at 21:58
  • 5
    Update: Eclipse has this ability from 3.7M3 version. You can adjust the visibility of space, tab, cr and lf individually. – Csaba_H Nov 02 '10 at 08:42

5 Answers5

260

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 at ☑ Show whitespace characters (configure visibility) to fine tune what should be shown.

Kudos go to John Isaacks

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820
  • 1
    Thanks for the tip. It's nice to know that this is probably a fixed issue. I will go ahead and search out the Eclipse issue system and file a request. – bryan kennedy Dec 12 '08 at 23:05
  • 1
    Now that Eclipse Indigo is out, this answer is no longer accurate. See John's comment on the original question. – Tyler Jun 24 '11 at 00:30
54

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

Click on the CheckBox "Show whitespace characters".

enter image description here

Thats all.!!!

ks1322
  • 33,961
  • 14
  • 109
  • 164
Sireesh Yarlagadda
  • 12,978
  • 3
  • 74
  • 76
27

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

Vishal John
  • 4,231
  • 25
  • 41
  • 1
    Exactly what I wanted. I even tried to search for 'word wrap' in context menu but couldn't find it in Neon. This helped a lot. Thanks. – Shiyaz Apr 18 '17 at 13:13
4

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.

1

AnyEdit Scroll all the way down: http://andrei.gmxhome.de/anyedit/examples.html

Guillaume Massé
  • 8,004
  • 8
  • 44
  • 57