2
votes

Is there any way in Eclipse (Galileo 3.52) to have it replace tabs with spaces ("soft tabs")? I've tried two things so far . . .

Windows>Preferences>Editors>Text Editors... check "Insert spaces for tabs"

...and...

Window->Preferences->Java->Code Style->Formatter->Edit... "Use Spaces to indent wrapped lines"

(... this forces you to create a new profile to save these settings)

This produces partial success - the first tab is turned in to spaces but subsequent ones are still tabs. So if I type

tabtab 1234

...I end up with...

spacespacespacespace tab 1234

2
It depends on the editor. Are you using the php, html, xml or java editor (or something else?)greg0ire
For "... Window->Preferences->Java->Code Style... " I'd assume he is using the Java editor.jhurtado

2 Answers

2
votes

You can do:

  1. Window -> Preferences -> Java -> Code Style -> Formatter
  2. Click on “Show” button (or "Edit") right beside the name of the profile you are using.
  3. In the indentantion Tab, change the "Tab Policy" field to "spaces only"
  4. Click Ok, and save the profile with the name you want.
0
votes

Could the missing setting be the Tab policy: Spaces only combo box in Preferences >Java > Code Style Formatter > Edit > Indentation (right above where you changed Use spaces to indent wrapped lines)?