I\'m having trouble with my new installed Visual Studio Code on Windows 7. On Mac the editor automatically closes html tags but on my Win7 not. I assume there must be some o
If you type
div.class
and then press TAB, VS code will automatically close the DIV tag with the given CLASS
But I think you want to do this operation by pressing the ENTER key.
In that case, go to your VS Code user setting & paste the following code:
"emmet.includeLanguages": {
"javascript": "javascriptreact",
"vue-html": "html",
"razor": "html",
"plaintext": "jade"
}
Now if you type
div.class
& then press the ENTER key, you can see the magic.
However, the above code will make your VS Code auto-completion with ENTER key not only for normal HTML but also the JSX of React, Vue.js snippets will also cover by this.
But If you want to do it only for HTML file, just the following line is enough:
"emmet.includeLanguages": { "javascript": "html" }
Cheers..