Sublime 3 returns "Unable to parse binding" 当我添加组合键时
Sublime 3 returns "Unable to parse binding" when I add a key combination
我将其输入 "Default (OSX).sublime-keymap":
[
{
"key": ["option+f1"],
"command": "insert_snippet",
"args": {"contents": "h2"}
}
]
并且在控制台中,Sublime 3 返回:
Unable to parse binding {args: {contents: h2}, command: insert_snippet, key: [option+f1]}
当然,组合键不起作用。知道为什么吗?
用于指定键绑定的 JSON 键是 keys
而不是 key
,即使列表中只有一个键。像下面这样的东西应该做你想做的:
{
"keys": ["option+f1"],
"command": "insert_snippet",
"args": {"contents": "h2"}
},
我将其输入 "Default (OSX).sublime-keymap":
[
{
"key": ["option+f1"],
"command": "insert_snippet",
"args": {"contents": "h2"}
}
]
并且在控制台中,Sublime 3 返回:
Unable to parse binding {args: {contents: h2}, command: insert_snippet, key: [option+f1]}
当然,组合键不起作用。知道为什么吗?
用于指定键绑定的 JSON 键是 keys
而不是 key
,即使列表中只有一个键。像下面这样的东西应该做你想做的:
{
"keys": ["option+f1"],
"command": "insert_snippet",
"args": {"contents": "h2"}
},