Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse html: Doesn't indent on some tags

For some reason, Eclipse seems to think that e.g. <div> and <td> tags aren't indenting-worthy.

Ctrl+Shift+F indents the following HTML as such:

<div>
<div>
<table>
    <tr>
        <td>test<br />
        test2
        <h1>test 2</h1>
        <div>testing<br />
        test2</div>
        <table>
            <tr>
                <td>
                <h1>again</h1>
                </td>
            </tr>
        </table>
        </td>
    </tr>
</table>
</div>
</div>

Anyone have any idea of how to turn this logic off (I want all tags to indent!), or customize it?

like image 752
stolsvik Avatar asked Jan 05 '11 16:01

stolsvik


1 Answers

Window > Preferences > Web > HTML Files > Editors.

Remove what you want to indent of the "Inline Elements" field.

enter image description here

This solved for me.

Hope its better now.

like image 84
Rodrigo Almeida Avatar answered Oct 15 '22 14:10

Rodrigo Almeida