How to format html files in Eclipse?

﹥>﹥吖頭↗ 提交于 2019-12-02 16:31:39
prasad vsv

go to Window --> preferences --> Web --> HTML files --> Editor.

In the Inline Elements section, select all the elements that you don't want eclipse to inline(continue with same line).

Click Apply and then Ok. Now re format using ctrl + shift + f.

go to Window --> preferences --> Web --> HTML files --> Editor.

Make sure "Indentation Size" is not set to zero.

That's what did it for me.

Eclipse Juno release seems to do a good job. It doesn't handle tags (that is the div tag that closes itself). Not sure why anyone would use it but we have a project that has them sprinkled about, probably from some WYSISYG editor someone was using.

Fidele Fison

CTRL+SHIFT+F works fine.

Just click on the source codes you want to format and then press CTRL+SHIFT+F.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!