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!
Quiero que la etiqueta se cierre al escribir </ ¿como lo puedo hacer?
LikeLike
Hi Lara, could you please provide more details for your request? Do you want to write </ yourself?
LikeLike
Autoclose is nice! The only addition I’d make is adding a > when the / is typed to create a singly-taged element. Example
LikeLike
The example was removed as HTML….
Example <a href=”…”/>
LikeLike
Hi Greg, thanks for your feedback. I have released a new version for this requirement, please install and have a try. 🙂
LikeLike
Thank you for Auto Close!
LikeLike
You are welcome. 🙂
LikeLike
Great!!
LikeLike
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!
LikeLike
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
LikeLike
You Sir, you are a god damn lifesaver! Love your extension, thank you sooooo much!
LikeLike
It’s my pleasure. 🙂
LikeLike
I want to enable “Sublime Text 3 Mode”, how or where do I add the setting?
{
“auto-close-tag.SublimeText3Mode”: true
}
Thanks
LikeLike
The setting is under File –> Preferences –> Settings, refer to this: https://code.visualstudio.com/docs/customization/userandworkspace#_creating-user-and-workspace-settings
LikeLike
Great, thanks 🙂
LikeLike
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
LikeLike
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: https://github.com/microsoft/vscode/issues
LikeLike
Brilliant thanks
LikeLiked by 1 person
Why does VSCode ignore the tag? It is also not covered by your extension, if I close an manually it ends up in .
LikeLike
very bad configuration instruction!!!!!!
LikeLike
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.
LikeLike