The solution that vscode can not complete the tag
This article mainly introduces the vscode can not complete the label of the solution, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.
What if vscode can't complete the tag? Completion of html tag codes such as div in vscode
Use vscode to write js code, the initial click on tab will not automatically complete the code, in fact, there are still a lot of inconvenience. Check the information, list the steps, and follow this setting.
Related recommendation: vscode tutorial
1, install the plug-in
2, configure the files.associations object
After opening, the page is as follows:
Find "files.associations" in the Comm Used list: {}
Click the edit button on the left and edit it in the edit box on the right.
{"emmet.triggerExpansionOnTab": true}
Add a row
{"emmet.triggerExpansionOnTab": true, "files.associations": {"* .js": "html"}}
Also, make changes in Workspace settings
It was.
{"workbench.editor.closeEmptyGroups": false, "emmet.triggerExpansionOnTab": true}
Add a row
{"workbench.editor.closeEmptyGroups": false, "emmet.triggerExpansionOnTab": true, "files.associations": {"* .js": "html"}}
After saving, go back to the js file, tag it, automatically complete it, and the code takes effect.
Tips: if the file you want to complete is not a js file, but other suffixes, such as .vue files, simply add the file suffix to the list.
For example:
{"emmet.triggerExpansionOnTab": true, "files.associations": {"* .js": "html", "* .vue": "html"}}
Remember to add both setting.
Thank you for reading this article carefully. I hope the article "vscode can not complete the tag solution" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!