Home  >  Article  >  Development Tools  >  vscode sets html tag code completion

vscode sets html tag code completion

王林
王林Original
2019-12-30 15:31:274227browse

vscode sets html tag code completion

1. Install the plug-in

vscode sets html tag code completion

2. Configure the files.associations object

vscode sets html tag code completion

The page after opening is as follows:

vscode sets html tag code completion

Find "files.associations" in the Comm Used list: {}

vscode sets html tag code completion

Click the edit button on the left and edit in the edit box on the right. It turns out to be

vscode sets html tag code completion

Add a line

vscode sets html tag code completion

##Similarly , also made changes in Workspace settings. It turned out to be

vscode sets html tag code completion

. Add

vscode sets html tag code completion

After saving, return to the js file. Hit the
tag, auto-complete, and the code will take effect.

Tips: If the file you want to complete is not a js file, but another suffix, such as a .vue file, just add the file suffix to the end of the list.

For example:

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

Remember to add both settings.

Recommended related articles and tutorials:

vscode tutorial

The above is the detailed content of vscode sets html tag code completion. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn