Auto Close Tag for Visual Studio Code

First, I want to celebrate that my first extension Terminal for Visual Studio Code has got nearly 400 installs within one week from it is released! Cheers! ✌️✌️✌️

And Yes! My second extension for Visual Studio Code has been released: Auto Close Tag ✌️✌️✌️

When I was viewing User Voice for VS Code, I saw this idea about Auto close/rename HTML tags has over 2000 votes. I have a try on the Visual Studio IDE and PhpStorm and find that both of them support the auto close tag. This is strange that the VS code does not support the auto close tag function. After some investigation, I find that the 0.3.0 Release Notes said:

HTML auto closing of tags has now been removed and replaced with smarter IntelliSense on </.

Though VS Code has IntelliSense on </ and Emmet support, I still think auto close tag is more convenient than </ IntelliSense and Emment. Moreover, I think many people have been used to auto close tag for a long time. Therefore, I decided to implement the auto close function first. 🙂 Enjoy it!



21 thoughts on “Auto Close Tag for Visual Studio Code

  1. Autoclose is nice! The only addition I’d make is adding a > when the / is typed to create a singly-taged element. Example


      1. Hi Greg, thanks for your feedback. I have released a new version for this requirement, please install and have a try. 🙂


  2. auto-close tag doesnt seem to work for me. One day i opened vscode and it suddenly stopped working after the version update.
    even though i have mentioned it in the settings. please help!


    1. Hi Shyam, it is working in VS Code 1.7. However, there is an API change (should be a bug) in VS Code 1.8.0 and I have create an issue for VS Code team. You could reference this thread for updates and workaround options


  3. I want to enable “Sublime Text 3 Mode”, how or where do I add the setting?

    “auto-close-tag.SublimeText3Mode”: true



  4. What would be nice is auto quotes as well, so when typing a attribute: class=item
    Visual Studio automatically place two double quotes (“”) when you type the the equals sign (=).
    There is also no autocomplete for css classes, Visual Studio give you a list of classes to choose from as you type


  5. Good, but when close tag with SublimeText3Mode tourn on, the code not know that some tag are already close before that line… the extension not consider avery tag in the code.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s