你能帮忙吗,Visual Studio Code 中是否有任何快捷方式可以完成/关闭 html 标签?例如,我编辑一个文件:
<div><p>Some text | <- cursor is here, I press a hotkey and get the </p> closing tag and cursor comes after it. I press the hotkey again and get the </div> closing tag.
答案1
您需要安装此扩展:https://marketplace.visualstudio.com/items?itemName=Compulim.compulim-vscode-closetag
要关闭标签而不移动光标或选择,请按Alt+ Shift+.执行closeTag.closeHTMLTagInPlace
命令。