Question

That is instead of

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

I would like

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

I've tried reformat, but it always gives me the top result. I've tried the call to action and went into the format settings, but it didn't change anything.

This seems trivial, but I have a huge unformatted .jsp file and it is impossible to work with in WebStorm.

Was it helpful?

Solution

Make sure that <table> and <tr> are not listed in Settings/Code Style/HTML/Other/Do not indent children of: option - this should help when formatting HTML. But note that it won't work for JSP - actually there is no way to get formatting working for jsp files in WebStorm. See WEB-527

OTHER TIPS

On the Main menu-->choose Code-->Reformat Code or press Ctrl+Alt+L.

In the Reformat Code dialog box, specify the reformatting scope: The current file. Selected text. All files in the current directory, including or omitting subdirectories. You can also include optimizing imports, by selecting the Optimize imports check box, which is enabled for the current directory only. Click Run.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top