Search code examples
htmlpugwebstormauto-indent

How to make the generated HTML file auto-indent in WebStorm 10


I'm using WebStorm 10 with Jade. The generated HTML is not auto-indent, for e.g:

index.jade:

extends layout
    block content
        h1= title
        p Welcome to #{title}

index.html

<!DOCTYPE html><html><head><title></title><link rel="stylesheet" href="/stylesheets/style.css"></head><body><h1></h1><p>Welcome to </p></body></html>

Is there a way to auto-indent the generated HTML ?


Solution

  • Ctrl + Alt + L on Windows and Linux

    Option + Command + L on Mac OS X

    See Reformatting Source Code

    Updated

    If you set the $FileName$ --pretty in Arguments: the output should be nicely formatted.

    Screen shot