zab*_*rob 7 html autoformatting visual-studio-code
VSCode 的格式化程序默认不缩进<head>
和<body>
标记。在默认设置中,存在以下几行:
// Indent <head> and <body> sections.
"html.format.indentInnerHtml": false,
Run Code Online (Sandbox Code Playgroud)
我尝试html.format.indentInnerHtml
在用户设置中设置为,true
但它没有改变任何东西。
这就是我得到的:
<html>
<head></head>
<body></body>
</html>
Run Code Online (Sandbox Code Playgroud)
这就是我要的:
<html>
<head></head>
<body></body>
</html>
Run Code Online (Sandbox Code Playgroud)
小智 5
文件/首选项/设置
或捷径
Ctrl+逗号
并将html.format.indentInnerHtml更改为true
.
{
"html.format.indentInnerHtml": true
}
Run Code Online (Sandbox Code Playgroud)
本网站上更多有用的设置
https://code.visualstudio.com/docs/languages/html#_formatting
归档时间: |
|
查看次数: |
2084 次 |
最近记录: |