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!


Comments (17)

  1. Lara says:

    Quiero que la etiqueta se cierre al escribir </ ¿como lo puedo hacer?

    1. Hi Lara, could you please provide more details for your request? Do you want to write </ yourself?

  2. Greg Dennis says:

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

    1. Greg Dennis says:

      The example was removed as HTML…. :/

      Example <a href=”…”/>

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

  3. Joel Palmer says:

    Thank you for Auto Close!

  4. Primal Shade says:


  5. Shyam Padia says:

    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

  6. Nightking says:

    You Sir, you are a god damn lifesaver! Love your extension, thank you sooooo much!

    1. It’s my pleasure. 🙂

  7. esau says:

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

    “auto-close-tag.SublimeText3Mode”: true


      1. esau says:

        Great, thanks 🙂

  8. Luke says:

    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

    1. That kind of features would not be in the scope of this ‘Auto Close Tag’ extension. You may just want to open a feature request for VS Code:

Skip to main content