Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code disable auto closing tags

I'm trying to prevent auto closing tags, but the following setting doesn't seem to work:

{     "html.autoClosingTags": false, } 

What else must be done to make auto-closing tags go away?

like image 219
zStian Avatar asked Sep 28 '17 07:09

zStian


People also ask

How do I stop auto closing tags in VS code?

First, go to the Settings and search for "HTML: Auto Closing Tags" and uncheck the setting that is checked by default.

How do I enable auto close tags in Visual Studio Code?

File > Preferences > Keymaps, Search 'Auto close' and click on install. If it doesn't work, reload the plugin.

What tags are self closing?

↑ The full list of valid self-closing tags in HTML5 is: area, base, br, col, embed, hr, img, input, keygen, link, meta, param, source, track, and wbr.


1 Answers

Just in case anyone looking at this is finding that HTML tags are still being automatically closed inside JSX files. The setting you need is:

{   "javascript.autoClosingTags": false,   "typescript.autoClosingTags": false } 
like image 164
Ben Jackson Avatar answered Sep 20 '22 12:09

Ben Jackson