vscode设置html标签代码补全

vscode设置html标签代码补全

1、安装插件

vscode设置html标签代码补全

2、配置files.associations对象

vscode设置html标签代码补全

打开后页面如下:

立即学习前端免费学习笔记(深入)”;

vscode设置html标签代码补全

在Comm Used列表中找到”files.associations”: {}

vscode设置html标签代码补全

点击左边的edit按钮,在右边的编辑框编辑,原来是

vscode设置html标签代码补全

添加一行

vscode设置html标签代码补全

同样,在Workspace settings里也做更改,原来是

vscode设置html标签代码补全

添加

vscode设置html标签代码补全

保存后,回到JS文件,打

标签,自动补全,代码生效。

Tips:如果你想补全的文件不是js文件,而是其他后缀,比如.vue文件,直接把文件后缀加到list后面即可

比如:

{     "emmet.triggerExpansionOnTab": true,     "files.associations": {         "*.js": "html",         "*.vue": "html"     } }

要记得两个setting都要加。

相关文章教程推荐:vscode教程

以上就是

© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享