0

Sublime 的 Anaconda 插件的默认键盘映射中存在以下条目(它会显示方法的文档):

{
    command": "anaconda_doc", "keys" ["ctrl+alt+d"], "context: [
         {"key": "selector", "operator": "equal", "operand": "source.python"}
    ]
}

我想添加["ctrl+."]键,以便我可以按ctrl+alt+dctrl+.调出文档。有没有办法在条目中添加or条件?keys

我试过["ctrl+alt+d", "ctrl+."]了,但这只是转化为ctrl+alt+d+.. 我的其他尝试都没有奏效。

4

1 回答 1

2

无法在keys条目中添加“或” - 要获得另一个组合键来执行相同的操作,您必须复制绑定:

{
    "command": "anaconda_doc", "keys" ["ctrl+alt+d"], "context": [
         {"key": "selector", "operator": "equal", "operand": "source.python"}
    ]
},
{
    "command": "anaconda_doc", "keys" ["ctrl+."], "context": [
         {"key": "selector", "operator": "equal", "operand": "source.python"}
    ]
}
于 2017-05-08T03:59:48.573 回答