[img]http://img0.52tietu.com/?MF81NzQzXzBfMjAxMjA4MjkxNDI3MjQxMg.png[/img]
Window -----> Preferences”
1、General -----> Editors ------> Text Editors
2、右侧找到Displayed tab width: 把下面的“Insert spaces for tabs” 勾选上,
其他相关的
1、java的
右击项目--->属性---->Java Code Style---->Formatter
2、javascript(一定是.js文件的 不是内嵌在html/jsp中的js)
右击项目--->属性---->JavaScript---->Formatter
点击【edit】--->Indentation
Tab policy 选择 Space Only
Indentation Size : 如4
Tab Size : 0
3、html的
Window--->Preferences--->Web---->HTML Files---->Editor
选择 Indentation using spaces 然后大小是4
4、css的
Window--->Preferences--->Web---->CSS Files---->Editor
选择 Indentation using spaces 然后大小是4
5、jsp的
Window--->Preferences--->Web---->JSP Files----> 会自动委托为 HTML / XML
6、xml的
Window--->Preferences--->Web---->XML Files----> 会自动委托为 HTML / XML
Window->Preferences->General->Editors->Text Editors->Show whitespace characters
有图有真想 :D
[img]http://dl.iteye.com/upload/picture/pic/117581/ec517853-fca8-38b4-aef8-ebd9c23eef5e.png[/img]
如果想取消,就把
Window->Preferences->General->Editors->Text Editors->Show whitespace characters
这个 [Show whitespace characters ]取消,反之