有关vscode键绑定的when子句的主列表/文档吗?

时间:2016-07-01 20:54:14

标签: visual-studio-code

是否有关于vscode键绑定的when子句的主列表/文档?

我无法在任何地方找到这个记录。如果我想指定不同的动作。假设我想让Ctrl + B在不在任务“上下文”时启动构建任务,并在我处于任务上下文时终止。

我查看了文件并在找到的时候写下了所有内容,但没有任何内容看起来像“那件事”。

// Place your key bindings in this file to overwrite the defaults
[{
    "key": "cmd+b",
    "command": "workbench.action.tasks.build",
    "when": "editorTextFocus"
},{
    "key": "ctrl+c",
    "command": "workbench.action.tasks.terminate",
    "when": "???"
}
]
  • inDebugMode
  • inQuickOpen
  • editorTextFocus
  • suggestWidgetVisible
  • suggestionSupportsAcceptOnKey
  • editorLangId =='xxx'
  • searchViewletVisible
  • renameInputVisible
  • accessibilityHelpWidgetVisible
  • quickFixWidgetVisible
  • parameterHintsVisible
  • referenceSearchVisible
  • !config.editor.stablePeek
  • markersNavigationVisible
  • editorFocus
  • inSnippetMode
  • breakpointWidgetVisible
  • findWidgetVisible
  • editorTabMovesFocus
  • editorHasSelection
  • editorHasMultipleSelections
  • inReferenceSearchEditor

(写完之后我发现this post where a similar list is posted, but there is no way to be sure that we have the entire list

1 个答案:

答案 0 :(得分:0)

虽然我确定它不是确定的,但这是Microsoft提供的列表https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts