Reputation: 13937
When i open an html file in eclipse, after i format it, it looks like this:
<form>
<fieldset>
<label for="memberName">Login Name:</label> <input type="text"
name="memberName" id="memberName" value=""
class="text ui-widget-content ui-corner-all" /> <label
for="memberPass">Password:</label> <input type="password"
name="memberPass" id="memberPass" value=""
class="text ui-widget-content ui-corner-all" />
</fieldset>
</form>
but i want each tag with all of its attributes on the same line
how do i make eclipse understand that?
Upvotes: 24
Views: 15683
Reputation: 103
Go to Window->Preferences->Web->HTML Files->Editor
Apply and Close, Now format your code by pressing ctrl+Shift+F
Upvotes: 4
Reputation: 2279
To change the formatting as usual, go to Window->Preferences->Web->HTML Files->Editor, and remove all inline Elements like this:
Upvotes: 9
Reputation: 1225
Under
Window->Preferences->Web->HTML Files->Editor
there are some options in terms of HTML formatting.
In comparison to Java, there are almost no options available, but maybe you can figure out on what to do.
Upvotes: 4
Reputation: 275
You can find the answer here how to turn off break line in eclipse
Follow these steps to Not wrap.
Go to Window->Preferences->Java->Code Style->Formatter. Create new formatter. Click on edit and then pick tab Line Wrapping and set Line Wrapping policy to Do not wrap.
Upvotes: 2