【问题标题】:Bracket IDE's Quick Markup equivalent for VS CodeBracket IDE 的 VS Code 的 Quick Markup 等价物
【发布时间】:2019-03-09 15:37:16
【问题描述】:
Quick Markup (https://github.com/redmunds/brackets-quick-markup) 是一个可用于 HTML 开发的 Brackets IDE 的扩展。可以使用快捷键 Ctrl+Alt+M 激活扩展。当它处于活动状态时,我们可以使用自定义快捷方式插入自定义 HTML 标签,而不是输入它们。例如,要在单词周围插入<b></b> 标签,我们只需要选择单词并按Ctrl+B。可以自定义快捷键及其对应的标签。
我正在 Visual Studio Code 中寻找类似的扩展或功能。我尝试搜索,但到目前为止找不到任何东西。
【问题讨论】:
标签:
html
visual-studio-code
markup
adobe-brackets
【解决方案1】:
keybindings.json
{
"key": "ctrl+b",
"command": "editor.emmet.action.wrapWithAbbreviation",
"when": "editorHasSelection",
"args": {
"abbreviation": "b"
}
},
{
"key": "ctrl+shift+b",
"command": "editor.emmet.action.wrapWithAbbreviation",
"when": "editorHasSelection",
"args": {
"abbreviation": "pre>code"
}
},
您也可以不使用args 来调用它,并且每次都输入标签。
或者只是输入任何内容:
{
"key": "ctrl+b",
"command": "editor.action.insertSnippet",
"args": {
"snippet": "<br />"
}
}