Is there any way in Eclipse (Galileo 3.52) to have it replace tabs with spac开发者_Python百科es ("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
You can do:
- Window -> Preferences -> Java -> Code Style -> Formatter
- Click on “Show” button (or "Edit") right beside the name of the profile you are using.
- In the indentantion Tab, change the "Tab Policy" field to "spaces only"
- Click Ok, and save the profile with the name you want.
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)?
精彩评论