How can I create a webstorm format for my html, how does eclipse do it?

It is instead

<table> <tr> <td>content</td> </tr> <table> 

I would like to

 <table> <tr> <td>content</td> </tr> </table< 

I tried reformatting, but it always gives me the best result. I tried the call and went to the format settings, but did not change anything.

This seems trivial, but I have a huge unformatted jsp that is not possible to work with in Webstorm.

+6
source share
2 answers

Make sure that <table> and <tr> not specified in the settings / Code Style / HTML / Other / Do not retreat children from: option - this should help when formatting HTML. But note that this will not work for JSP - there really is no way to get the formatting working for jsp files in WebStorm. See WEB-527

+13
source

In the main menu → select "Code" → "Convert Code" or press Ctrl + Alt + L.

In the Conversion Code dialog box, specify the reformatting area: Current file. The selected text. All files in the current directory, including or omitting subdirectories. You can also enable import optimization by selecting the Optimize import checkbox, which is enabled only for the current directory. Click Run.

+4
source

All Articles