一、Eclipse 基本 Editor 的设置使用空格替换 Tab
Window -> Preferences -> General -> Editors -> Text Editors
二、对 Java/HTML/Ant 等扩展编辑器,还需要单独去设定
1). For Java: sets java code style in eclipse
Window -> Preferences -> java -> Code style -> Formatter
add a new profile , for more detail, test it in eclipse please
2). For Ant: sets build.xml in eclipse
Window -> Preferences -> Ant > Editor -> Formatter
uncheck [Use tab character instead of spaces] option.
3). For Html:
Window- > Preferences -> Web and XML -> HTML Files -> HTML Source
select "Indent using tabs" and set space =4
4). For XML:
Windows -> Preferences -> Web and XML -> XML Files -> XML Source
select "Indent using tabs" and set space =4
三、如何配置 jsp/properties 等文件默认使用 UTF-8 编码创建或者阅读?
Window -> Preferences -> General -> Content Types
下选择指定的扩展名,然后说明相应的编码,然后Update.
--转自
该贴由koei123转至本版2015-7-14 11:05:44