简体   繁体   English

VS Code 扩展以纠正 html 自动关闭标签烦人的行为

[英]VS Code extension to correct html auto closing tag annoying behavior

  1. I don't want VS code to generate the closing tag in HTML when i type then opening tag.当我输入然后打开标签时,我不希望 VS 代码在 HTML 中生成结束标签。 For example, when i type <p> , i don't want a </p> to be added as i type.例如,当我输入<p> ,我不希望在输入时添加</p> It's extremely annoying for me, so i deactivated the autoclosing tag setting.这对我来说非常烦人,所以我停用了自动关闭标签设置。
  2. And when i finish a content, and type </ , i still want the corresponding tag to be automatically added.当我完成一个内容并输入</ ,我仍然希望自动添加相应的标签。

Any ideas on how to obtain this "i don't type in advance, but i help you when you close" behavior, please ?关于如何获得这种“我不提前打字,但在你关闭时我会帮助你”行为的任何想法,好吗?

Thanks谢谢

If you turn off the autoClosingTags setting, Intellisense will suggest the closing tag for you when you type </ , so just have to hit enter then.如果您关闭autoClosingTags设置,Intellisense 会在您键入</时为您建议结束标签,因此只需按 Enter 键即可。 Without a customer VS Code extension, I don't think there is a setting for this out the box.如果没有客户 VS Code 扩展,我认为没有开箱即用的设置。

Open VSCode, navigate to打开 VSCode,导航到

Preferences -> Settings首选项 -> 设置

In the User Settings, click Text Editor, and look for the setting Auto Closing Brackets .在用户设置中,单击文本编辑器,然后查找设置Auto Closing Brackets Set it to never.将其设置为从不。

There is an extension for the same also as u have asked in the question与您在问题中提出的相同,还有一个扩展名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM