开发者

Spaces instead of tabs in Eclipse (Galileo 3.52)?

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:

  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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜