Reputation: 31709
Is there any way in Eclipse to format a code that contains divs in the way Netbeans do it?
I mean, if you have this in Netbeans:
<div>
</div>
</div>
<div>
and you format it (Source > Format), it becomes this way:
<div>
<div>
</div>
</div>
Upvotes: 2
Views: 2586
Reputation: 1323823
Yes, you can if:
Upvotes: 1
Reputation: 9377
The shortcut you'll need is: CTRL + SHIFT + F
That works for HTML, CSS, PHP, XML, JS and so on. But you need to have a PHP, HTML editor/plugin like Aptana, PDT or WTP.
Upvotes: 2