【发布时间】:2020-05-05 01:51:27
【问题描述】:
有没有办法在 Visual Studio Code 中选择几行代码,并以某种方式自动用 div(或其他标签)包装它们?
感谢您的帮助
米索斯
【问题讨论】:
-
谢谢,我也去看看...
标签: html visual-studio-code tags
有没有办法在 Visual Studio Code 中选择几行代码,并以某种方式自动用 div(或其他标签)包装它们?
感谢您的帮助
米索斯
【问题讨论】:
标签: html visual-studio-code tags
您可以使用Emmet: Wrap Individual lines with abbreviation。
如果你有一个固定的标签你想用来包装你可以在keybindings.json添加一个键盘快捷键
{
"key": "shift+alt+d",
"when": "editorTextFocus && editorLangId == html",
"command": "editor.emmet.action.wrapIndividualLinesWithAbbreviation",
"args": { "abbreviation": "div" }
}
【讨论】: