作者:じ☆ve宝贝
发布时间:2016-02-29T14:42:03
Window -> Preferences —> General —> Content Types —> Text —> Java Source File
下面的 Default encoding设置为UTF-8 点击Update
Window -> Preferences —> General —> Workspace 中Text File encoding 选择other下拉框中选择UTF-8
Window -> Preferences —> Web —> JSP Files 中Encoding 下拉框中选择UTF-8
Window -> Preferences —> Java —> Code Style —> Code Templates —> Improt
选择 —> 我的codetemplates.xml
Window -> Preferences —> Java —> Code Style —> Formatter
选择 —> java.code.style.xml
Window -> Preferences-> Web -> HTML Files-> Editor 中Line width加个0以后保存。
Window -> Preferences -> XML -> XML Files -> Editor :
设置每行宽度 Line width 设定为80到100个字符。
标签的每个属性都单独一行显示: 选中Split multiple attributes each on a new line
标签结束符不单独占用一行: 不选中Align final bracket in multi-line element tags
去掉所有空行: 选中Clear all blank lines
在标签结束符前添加空格: 选中Insert whitespace before closing empty end-tags
缩进使用空格代替tab: 选中Indent using spaces
设定缩进宽度 Indentation size 设定为4,即缩进4个空格。