質問

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.

役に立ちましたか?

解決

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

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top