你能数一下你现在有多少VS代码扩展吗?开的越多,平时越慢。
目前有大量的扩展提供了VS Code已经内置的功能,它们是在功能还没有添加的时候启用的,但是现在已经变成了累赘。
1.Auto Close HTML/XML Tag
当您添加新的HTML标记时,此功能会自动添加相应的结束标记。
这些扩展为VSCode添加了自动关闭功能:
Auto Close Tag (下载量12.3M+): “自动添加HTML/XML闭合标签,与Visual Studio IDE或Sublime Text相同”.
Close HTML/XML Tag (下载量344K): “快速闭合上次打开的HTML/XML标签”。
但功能已经内置
我使用这些设置来启用/禁用VSCode中标签的自动关闭:
HTML: Auto Closing Tags
: "Enable/disable autoclosing of HTML tags". 默认为true
。JavaScript: Auto Closing Tags
: "Enable/disable automatic closing of JSX tags". 默认为true
TypeScript: Auto Closing Tags
: "Enable/disable automatic closing of JSX tags".默认为true
。
将以下内容添加到 settings.json
文件以启用它们: