如何在WebStorm 10中使生成的HTML文件自动缩进

时间:2023-01-14 14:05:19

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

我正在使用带有Jade的WebStorm 10。生成的HTML不是自动缩进的,例如:

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 ?

有没有办法自动缩进生成的HTML?

1 个解决方案

#1


Ctrl + Alt + L on Windows and Linux

在Windows和Linux上按Ctrl + Alt + L.

Option + Command + L on Mac OS X

Mac OS X上的Option + Command + L.

See Reformatting Source Code

请参阅重新格式化源代码

Updated

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

如果在Arguments中设置$ FileName $ --pretty:输出应格式良好。

如何在WebStorm 10中使生成的HTML文件自动缩进

#1


Ctrl + Alt + L on Windows and Linux

在Windows和Linux上按Ctrl + Alt + L.

Option + Command + L on Mac OS X

Mac OS X上的Option + Command + L.

See Reformatting Source Code

请参阅重新格式化源代码

Updated

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

如果在Arguments中设置$ FileName $ --pretty:输出应格式良好。

如何在WebStorm 10中使生成的HTML文件自动缩进