Visual Studio Code 键盘快捷键选项列表 [英] Visual Studio Code list of keyboard shortcuts options
问题描述
Visual Studio Code 在其键绑定方面是高度可定制的,尤其是在上下文绑定方面(使用 "when"
将相同的快捷方式绑定到不同上下文中的不同命令).
Visual Studio Code is highly customizable in its key bindings, especially when it comes to contextual bindings (using "when"
to bind the same shortcut to different commands in different contexts).
我正在寻找一个可用于那些"when"
条件的变量列表.(有一个很棒的命令列表,但那里没有列出条件).我看到条件是一个必须计算为布尔值的 JavaScript 表达式,但不清楚作用域中有哪些变量.
I'm looking for a list of variables that can be used in those "when"
conditions. (There is a great list of commands, but conditions are not listed there). I see the condition is a JavaScript expression that must evaluate to a boolean, but it is unclear what variables are in scope.
有人可以提供这样的列表吗?
Can someone provide such a list?
推荐答案
这些是希望所有可以在 when
条件下使用的变量:
These are hopefully all variables that can be used in when
conditions:
editorFocus
editorHasMultipleSelections
editorHasSelection
editorLangId == 'name' // for example: editorLangId == 'typescript'
editorTabMovesFocus
editorTextFocus
findWidgetVisible
globalMessageVisible
hasWordHighlights
inChangeAllMode
inDebugMode
inQuickOpen
inReferenceSearchEditor
inSnippetMode
markersNavigationVisible
parameterHintsVisible
peekDeclarationVisible
quickFixWidgetVisible
referenceSearchVisible
renameInputVisible
searchViewletVisible
suggestWidgetVisible
textCompareEditorVisible
您可以使用 &&
连接它们并使用 !
反转它们.例如
You can concat them with &&
and invert them with !
. For example
editorTextFocus && !editorTabMovesFocus
这篇关于Visual Studio Code 键盘快捷键选项列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!