VSCode HTML如何启用自动关闭标签和标签建议

时间:2019-12-08 08:11:02

标签: html visual-studio-code

在我的VSCode中,当我使用html时,当我放置新标签时,它不会给我建议标签名称。另外,在编写时如何使用>自动关闭标签?我已经安装了HTML代码片段,锅炉,Intellisense自动完成标记扩展。

这是setting.json中写的

"python.pythonPath": "C:\\ProgramData\\Anaconda3",
"editor.renderWhitespace": "boundary",
"editor.tabCompletion": "on",

"auto-close-tag.enableAutoCloseTag": true,
"auto-close-tag.fullMode": true,
"auto-close-tag.SublimeText3Mode": true,
"html.format.indentInnerHtml": true,
"html.format.endWithNewline": true,
"html-css-class-completion.enableEmmetSupport": true,
"html.suggest.html5": true

1 个答案:

答案 0 :(得分:0)

我刚刚找到了我的解决方案 here,第三个答案。事实证明,VS Code 会自动检测语言为“django-html”而不是普通的“html”,因此,我在 VS Code 上为 html 安装的任何扩展都无法正常工作!

您可以通过单击 VS Code 右下角的 django-html 并将其更改为常规 html 来将自动检测更改为常规 HTML。

相关问题