Stop Indenting After Closing HTML Tags

How can I get PhpStorm/WebStorm to stop indenting after closing HTML tags?

For instance, if I type this any of these tags:

<!DOCTYPE html>

<link rel="stylesheet" href="/path" />

<script src="/path"></script>


After the closing doctype tag, link tag, script tag, and body tag, PhpStorm 4.0.2 indents 8 spaces.

I've tried fiddling with the "Do not indent children of..." setting in Code Style > HTML, but this doesn't work and the setting is for children of those tags -- my problem is occurring AFTER the close of those tags.

Why is this occurring and how can I stop it?


To make sure my explanation is clear, here is what happens after typing the closing body tag:

........(IDE automatically indents next line to here -- 8 spaces in)

1 comment
Comment actions Permalink

Figured out that setting the "Continuation Indent" setting to 0 fixes this problem.

Settings > Project Settings > Code Style > General > Continuation Indent: 0

Will report if changing this setting leads to other issues. I'm guessing the problem has something to do with using the HTML5 doctype, but can't tell for sure.


Please sign in to leave a comment.