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?
Eclipse HTML Editor is an Eclipse plugin for HTML , JSP , and XML editing and has the following features: HTML , JSP , XML , CSS , DTD , and JavaScript colored highlighting.
Open the required file. Go to Source | Format Document or press Ctrl+Shift+F.
go to Window --> preferences --> Web --> HTML files --> Editor. Make sure "Indentation Size" is not set to zero.
You can use Ctrl + A to select the entire file, then use this shortcut to quickly fix all the indentation. You can also change how Eclipse handles indentation by going to Window > Preferences, then in the left panel, navigate to Java > Code Style > Formatter > Edit... > Indentation.
To change the formatting as usual, go to Window->Preferences->Web->HTML Files->Editor, and remove all inline Elements like this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With