今天早上用myeclipse格式化jsp,发现无法去除空白行,同时发现缩进不正确,有的缩进的多,有的缩进的少,后来发现可以设置
如下可以解决问题,随便把其他需要勾选的英文意思附在文章下面:
Window -> Preferences -> MyEclipse Enterprise Workbench -> HTML -> HTML Source,勾选"Clear all blank lines"去掉空白。使用的快捷键:Ctrl+Shift+F
1.1设置每行宽度
Line width 设定为80到100个字符。
1.2标签的每个属性都单独一行显示:
选中Split multiple attributes each on a new line
1.3 标签结束符不单独占用一行:
不选中Align final bracket in multi-line element tags
1.4去掉所有空行:
选中Clear all blank lines
1.5 在标签结束符前添加空格:
选中Insert whitespace before closing empty end-tags
1.6缩进使用空格代替tab:
选中Indent using spaces
1.7 设定缩进宽度
Indentation size 设定为4,即缩进4个空格。