【发布时间】:2018-10-15 09:47:45
【问题描述】:
VS 代码:1.28.1
Mac OS High Sierra 10.13.6
我创建了一个自定义 sn-p 来在 HTML 文件中添加插值。使用 F1 >insert sn-p 方式时它工作正常但我需要添加键绑定以便它与键盘一起使用。这是我所做的,但它不起作用。
在vs code tutorial的帮助下创建一个sn-p
{
"interpolate": {
"prefix": "inter",
"body": ["{{ ${CLIPBOARD} |json }}"],
"description": "Interpolate this"
}
}
现在我需要绑定快捷键并将其添加到 keybindings.json 中
{
"key": "shift+cmd+i",
"command": "editor.action.interpolate",
"when": "editorTextFocus",
"args": {
"langId": "html",
"name": "interpolate"
}
}
但是每当我点击 Cmd+Shift+I 时。抛出错误
“找不到命令'editor.action.interpolate'
我在这里做错了什么?
【问题讨论】:
标签: visual-studio-code key-bindings vscode-extensions