VSCode not auto completing HTML

Harvey3589661 picture Harvey3589661 · Jun 7, 2015 · Viewed 88.4k times · Source

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 option to turn it on but I can't find any.

I'm talking about when eg. writing <html the intelliSense pops up and you click enter, usually it automatically puts in the </html> mine's not working. (The IntelliSense pops up but when you select one of the options it doesn't auto close the tag: <h1> -> </h1>)

Answer

Rabolf picture Rabolf · Jun 5, 2016

Type the tag name (without starting <) then press Tab

for example type div then press tab and VS will convert it to <div></div>

Or type the opening tag then press Tab twice

for example :

  1. type <div
  2. press Tab
  3. press Tab

it will add the closing tag