Reputation: 791
When working with Java, Ctrl+Alt+L formats your highlighted code. Is there such a command when working with non-Java files like HTML? The same command doesn't work with HTML.
Upvotes: 4
Views: 14275
Reputation: 4122
For Mac
Use Option+Command+L for Formatting HTML files.
You can check/customize it using: command+, for a search for Reformat Code.
Upvotes: 4
Reputation: 169
In Ultimate edition same keys (Ctrl+Alt+L) works for HTML as well. I suppose, community Edition doesn't support it out of the box.
Check settings: Settings -> Editor -> Code Style -> HTML
(If it is not present, try to install some plugins for HTML support)
Upvotes: 10