Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
8cb7cc0c
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8cb7cc0c
编写于
4月 20, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merge EditorContextKeys and ModeContextKeys
上级
50d1c5e5
变更
44
隐藏空白更改
内联
并排
Showing
44 changed file
with
296 addition
and
308 deletion
+296
-308
src/vs/editor/common/commonCodeEditor.ts
src/vs/editor/common/commonCodeEditor.ts
+6
-6
src/vs/editor/common/config/config.ts
src/vs/editor/common/config/config.ts
+53
-53
src/vs/editor/common/editorContextKeys.ts
src/vs/editor/common/editorContextKeys.ts
+15
-27
src/vs/editor/common/modes/editorModeContext.ts
src/vs/editor/common/modes/editorModeContext.ts
+17
-17
src/vs/editor/contrib/accessibility/browser/accessibility.ts
src/vs/editor/contrib/accessibility/browser/accessibility.ts
+2
-2
src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts
.../editor/contrib/bracketMatching/common/bracketMatching.ts
+1
-1
src/vs/editor/contrib/caretOperations/common/caretOperations.ts
.../editor/contrib/caretOperations/common/caretOperations.ts
+2
-2
src/vs/editor/contrib/caretOperations/common/transpose.ts
src/vs/editor/contrib/caretOperations/common/transpose.ts
+2
-2
src/vs/editor/contrib/clipboard/browser/clipboard.ts
src/vs/editor/contrib/clipboard/browser/clipboard.ts
+6
-6
src/vs/editor/contrib/comment/common/comment.ts
src/vs/editor/contrib/comment/common/comment.ts
+8
-8
src/vs/editor/contrib/contextmenu/browser/contextmenu.ts
src/vs/editor/contrib/contextmenu/browser/contextmenu.ts
+1
-1
src/vs/editor/contrib/find/common/findController.ts
src/vs/editor/contrib/find/common/findController.ts
+18
-18
src/vs/editor/contrib/folding/browser/folding.ts
src/vs/editor/contrib/folding/browser/folding.ts
+7
-7
src/vs/editor/contrib/format/browser/formatActions.ts
src/vs/editor/contrib/format/browser/formatActions.ts
+5
-5
src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts
...editor/contrib/goToDeclaration/browser/goToDeclaration.ts
+22
-22
src/vs/editor/contrib/gotoError/browser/gotoError.ts
src/vs/editor/contrib/gotoError/browser/gotoError.ts
+5
-5
src/vs/editor/contrib/hover/browser/hover.ts
src/vs/editor/contrib/hover/browser/hover.ts
+1
-1
src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts
...vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts
+4
-4
src/vs/editor/contrib/indentation/common/indentation.ts
src/vs/editor/contrib/indentation/common/indentation.ts
+3
-3
src/vs/editor/contrib/linesOperations/common/linesOperations.ts
.../editor/contrib/linesOperations/common/linesOperations.ts
+31
-31
src/vs/editor/contrib/multicursor/common/multicursor.ts
src/vs/editor/contrib/multicursor/common/multicursor.ts
+3
-3
src/vs/editor/contrib/parameterHints/browser/parameterHints.ts
...s/editor/contrib/parameterHints/browser/parameterHints.ts
+6
-6
src/vs/editor/contrib/quickFix/browser/quickFixCommands.ts
src/vs/editor/contrib/quickFix/browser/quickFixCommands.ts
+3
-3
src/vs/editor/contrib/quickOpen/browser/gotoLine.ts
src/vs/editor/contrib/quickOpen/browser/gotoLine.ts
+1
-1
src/vs/editor/contrib/quickOpen/browser/quickCommand.ts
src/vs/editor/contrib/quickOpen/browser/quickCommand.ts
+1
-1
src/vs/editor/contrib/quickOpen/browser/quickOutline.ts
src/vs/editor/contrib/quickOpen/browser/quickOutline.ts
+3
-3
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
...editor/contrib/referenceSearch/browser/referenceSearch.ts
+4
-4
src/vs/editor/contrib/rename/browser/rename.ts
src/vs/editor/contrib/rename/browser/rename.ts
+5
-5
src/vs/editor/contrib/smartSelect/common/smartSelect.ts
src/vs/editor/contrib/smartSelect/common/smartSelect.ts
+2
-2
src/vs/editor/contrib/snippet/common/snippetController.ts
src/vs/editor/contrib/snippet/common/snippetController.ts
+4
-4
src/vs/editor/contrib/suggest/browser/suggestController.ts
src/vs/editor/contrib/suggest/browser/suggestController.ts
+13
-13
src/vs/editor/contrib/wordOperations/common/wordOperations.ts
...vs/editor/contrib/wordOperations/common/wordOperations.ts
+12
-12
src/vs/workbench/browser/parts/editor/editorCommands.ts
src/vs/workbench/browser/parts/editor/editorCommands.ts
+1
-1
src/vs/workbench/parts/debug/browser/debugEditorActions.ts
src/vs/workbench/parts/debug/browser/debugEditorActions.ts
+8
-8
src/vs/workbench/parts/debug/electron-browser/repl.ts
src/vs/workbench/parts/debug/electron-browser/repl.ts
+4
-4
src/vs/workbench/parts/emmet/node/actions/base64.ts
src/vs/workbench/parts/emmet/node/actions/base64.ts
+1
-1
src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts
.../workbench/parts/emmet/node/actions/expandAbbreviation.ts
+4
-4
src/vs/workbench/parts/emmet/node/actions/updateTag.ts
src/vs/workbench/parts/emmet/node/actions/updateTag.ts
+1
-1
src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts
...orkbench/parts/emmet/node/actions/wrapWithAbbreviation.ts
+1
-1
src/vs/workbench/parts/emmet/node/emmetActions.ts
src/vs/workbench/parts/emmet/node/emmetActions.ts
+1
-1
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
...arts/preferences/browser/keybindingsEditorContribution.ts
+2
-2
src/vs/workbench/parts/snippets/electron-browser/insertSnippet.ts
...orkbench/parts/snippets/electron-browser/insertSnippet.ts
+1
-1
src/vs/workbench/parts/snippets/electron-browser/tabCompletion.ts
...orkbench/parts/snippets/electron-browser/tabCompletion.ts
+2
-2
src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.ts
.../walkThrough/electron-browser/walkThrough.contribution.ts
+4
-4
未找到文件。
src/vs/editor/common/commonCodeEditor.ts
浏览文件 @
8cb7cc0c
...
...
@@ -927,12 +927,12 @@ class EditorContextKeysManager extends Disposable {
this
.
_editor
=
editor
;
this
.
_editorId
=
contextKeyService
.
createKey
(
'
editorId
'
,
editor
.
getId
());
this
.
_editorFocus
=
EditorContextKeys
.
F
ocus
.
bindTo
(
contextKeyService
);
this
.
_editorTextFocus
=
EditorContextKeys
.
T
extFocus
.
bindTo
(
contextKeyService
);
this
.
_editorTabMovesFocus
=
EditorContextKeys
.
T
abMovesFocus
.
bindTo
(
contextKeyService
);
this
.
_editorReadonly
=
EditorContextKeys
.
R
eadOnly
.
bindTo
(
contextKeyService
);
this
.
_hasMultipleSelections
=
EditorContextKeys
.
H
asMultipleSelections
.
bindTo
(
contextKeyService
);
this
.
_hasNonEmptySelection
=
EditorContextKeys
.
H
asNonEmptySelection
.
bindTo
(
contextKeyService
);
this
.
_editorFocus
=
EditorContextKeys
.
f
ocus
.
bindTo
(
contextKeyService
);
this
.
_editorTextFocus
=
EditorContextKeys
.
t
extFocus
.
bindTo
(
contextKeyService
);
this
.
_editorTabMovesFocus
=
EditorContextKeys
.
t
abMovesFocus
.
bindTo
(
contextKeyService
);
this
.
_editorReadonly
=
EditorContextKeys
.
r
eadOnly
.
bindTo
(
contextKeyService
);
this
.
_hasMultipleSelections
=
EditorContextKeys
.
h
asMultipleSelections
.
bindTo
(
contextKeyService
);
this
.
_hasNonEmptySelection
=
EditorContextKeys
.
h
asNonEmptySelection
.
bindTo
(
contextKeyService
);
this
.
_register
(
this
.
_editor
.
onDidChangeConfiguration
(()
=>
this
.
_updateFromConfig
()));
this
.
_register
(
this
.
_editor
.
onDidChangeCursorSelection
(()
=>
this
.
_updateFromSelection
()));
...
...
src/vs/editor/common/config/config.ts
浏览文件 @
8cb7cc0c
...
...
@@ -227,7 +227,7 @@ class WordCommand extends CoreCommand {
precondition
:
precondition
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
WordCommand
.
getWordNavigationKB
(
shift
,
key
),
mac
:
{
primary
:
WordCommand
.
getMacWordNavigationKB
(
shift
,
key
)
}
}
...
...
@@ -282,7 +282,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
LeftArrow
,
mac
:
{
primary
:
KeyCode
.
LeftArrow
,
secondary
:
[
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_B
]
}
}
...
...
@@ -292,7 +292,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
LeftArrow
}
}));
...
...
@@ -301,7 +301,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
RightArrow
,
mac
:
{
primary
:
KeyCode
.
RightArrow
,
secondary
:
[
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_F
]
}
}
...
...
@@ -311,7 +311,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
RightArrow
}
}));
...
...
@@ -320,7 +320,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
UpArrow
,
mac
:
{
primary
:
KeyCode
.
UpArrow
,
secondary
:
[
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_P
]
}
}
...
...
@@ -330,7 +330,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
UpArrow
,
secondary
:
[
WordCommand
.
getWordNavigationKB
(
true
,
KeyCode
.
UpArrow
)],
mac
:
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
UpArrow
},
...
...
@@ -342,7 +342,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
DownArrow
,
mac
:
{
primary
:
KeyCode
.
DownArrow
,
secondary
:
[
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_N
]
}
}
...
...
@@ -352,7 +352,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
DownArrow
,
secondary
:
[
WordCommand
.
getWordNavigationKB
(
true
,
KeyCode
.
DownArrow
)],
mac
:
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
DownArrow
},
...
...
@@ -365,7 +365,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
PageUp
}
}));
...
...
@@ -374,7 +374,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
PageUp
}
}));
...
...
@@ -383,7 +383,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
PageDown
}
}));
...
...
@@ -392,7 +392,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
PageDown
}
}));
...
...
@@ -401,7 +401,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Home
,
mac
:
{
primary
:
KeyCode
.
Home
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyCode
.
LeftArrow
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_A
]
}
}
...
...
@@ -411,7 +411,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
Home
,
mac
:
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
Home
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
LeftArrow
]
}
}
...
...
@@ -421,7 +421,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
End
,
mac
:
{
primary
:
KeyCode
.
End
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyCode
.
RightArrow
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_E
]
}
}
...
...
@@ -431,7 +431,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
End
,
mac
:
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
End
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
RightArrow
]
}
}
...
...
@@ -441,7 +441,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_I
}
}));
...
...
@@ -453,7 +453,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
UpArrow
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
PageUp
}
}
...
...
@@ -463,7 +463,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
DownArrow
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
PageDown
}
}
...
...
@@ -474,7 +474,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
PageUp
,
win
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
PageUp
},
linux
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
PageUp
}
...
...
@@ -485,7 +485,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
PageDown
,
win
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
PageDown
},
linux
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
PageDown
}
...
...
@@ -499,7 +499,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
LeftArrow
,
linux
:
{
primary
:
0
}
}
...
...
@@ -509,7 +509,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
RightArrow
,
linux
:
{
primary
:
0
}
}
...
...
@@ -519,7 +519,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
UpArrow
,
linux
:
{
primary
:
0
}
}
...
...
@@ -529,7 +529,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
PageUp
,
linux
:
{
primary
:
0
}
}
...
...
@@ -539,7 +539,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
DownArrow
,
linux
:
{
primary
:
0
}
}
...
...
@@ -549,7 +549,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
PageDown
,
linux
:
{
primary
:
0
}
}
...
...
@@ -557,24 +557,24 @@ registerCommand(new CoreCommand({
registerCommand
(
new
CoreCommand
({
id
:
H
.
Tab
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
EditorContextKeys
.
T
abDoesNotMoveFocus
EditorContextKeys
.
t
extFocus
,
EditorContextKeys
.
t
abDoesNotMoveFocus
),
primary
:
KeyCode
.
Tab
}
}));
registerCommand
(
new
CoreCommand
({
id
:
H
.
Outdent
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
EditorContextKeys
.
T
abDoesNotMoveFocus
EditorContextKeys
.
t
extFocus
,
EditorContextKeys
.
t
abDoesNotMoveFocus
),
primary
:
KeyMod
.
Shift
|
KeyCode
.
Tab
}
...
...
@@ -582,10 +582,10 @@ registerCommand(new CoreCommand({
registerCommand
(
new
CoreCommand
({
id
:
H
.
DeleteLeft
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Backspace
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Backspace
],
mac
:
{
primary
:
KeyCode
.
Backspace
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Backspace
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_H
,
KeyMod
.
WinCtrl
|
KeyCode
.
Backspace
]
}
...
...
@@ -593,10 +593,10 @@ registerCommand(new CoreCommand({
}));
registerCommand
(
new
CoreCommand
({
id
:
H
.
DeleteRight
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Delete
,
mac
:
{
primary
:
KeyCode
.
Delete
,
secondary
:
[
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_D
,
KeyMod
.
WinCtrl
|
KeyCode
.
Delete
]
}
}
...
...
@@ -604,20 +604,20 @@ registerCommand(new CoreCommand({
registerCommand
(
new
CoreCommand
({
id
:
H
.
CancelSelection
,
precondition
:
EditorContextKeys
.
H
asNonEmptySelection
,
precondition
:
EditorContextKeys
.
h
asNonEmptySelection
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
}));
registerCommand
(
new
CoreCommand
({
id
:
H
.
RemoveSecondaryCursors
,
precondition
:
EditorContextKeys
.
H
asMultipleSelections
,
precondition
:
EditorContextKeys
.
h
asMultipleSelections
,
kbOpts
:
{
weight
:
CORE_WEIGHT
+
1
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
@@ -628,7 +628,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Home
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
UpArrow
}
}
...
...
@@ -638,7 +638,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
Home
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
UpArrow
}
}
...
...
@@ -648,7 +648,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
End
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
DownArrow
}
}
...
...
@@ -658,7 +658,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
End
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
DownArrow
}
}
...
...
@@ -666,10 +666,10 @@ registerCommand(new CoreCommand({
registerCommand
(
new
CoreCommand
({
id
:
H
.
LineBreakInsert
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
null
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_O
}
}
...
...
@@ -680,7 +680,7 @@ registerCommand(new CoreCommand({
precondition
:
null
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_U
}
}));
...
...
@@ -747,10 +747,10 @@ class UndoCommand extends BaseTextInputAwareCommand {
constructor
()
{
super
({
id
:
H
.
Undo
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_Z
}
});
...
...
@@ -771,10 +771,10 @@ class RedoCommand extends BaseTextInputAwareCommand {
constructor
()
{
super
({
id
:
H
.
Redo
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
weight
:
CORE_WEIGHT
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_Y
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_Z
],
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_Z
}
...
...
src/vs/editor/common/editorContextKeys.ts
浏览文件 @
8cb7cc0c
...
...
@@ -10,35 +10,24 @@ export namespace EditorContextKeys {
/**
* A context key that is set when the editor's text has focus (cursor is blinking).
*/
export
const
T
extFocus
=
new
RawContextKey
<
boolean
>
(
'
editorTextFocus
'
,
false
);
export
const
t
extFocus
=
new
RawContextKey
<
boolean
>
(
'
editorTextFocus
'
,
false
);
/**
* A context key that is set when the editor's text or an editor's widget has focus.
*/
export
const
Focus
=
new
RawContextKey
<
boolean
>
(
'
editorFocus
'
,
false
);
/**
* A context key that is set when the editor's text is readonly.
*/
export
const
ReadOnly
=
new
RawContextKey
<
boolean
>
(
'
editorReadonly
'
,
false
);
export
const
Writable
:
ContextKeyExpr
=
ReadOnly
.
toNegated
();
/**
* A context key that is set when the editor has a non-collapsed selection.
*/
export
const
HasNonEmptySelection
=
new
RawContextKey
<
boolean
>
(
'
editorHasSelection
'
,
false
);
export
const
HasOnlyEmptySelection
:
ContextKeyExpr
=
HasNonEmptySelection
.
toNegated
();
/**
* A context key that is set when the editor has multiple selections (multiple cursors).
*/
export
const
HasMultipleSelections
=
new
RawContextKey
<
boolean
>
(
'
editorHasMultipleSelections
'
,
false
);
export
const
HasSingleSelection
:
ContextKeyExpr
=
HasMultipleSelections
.
toNegated
();
export
const
TabMovesFocus
=
new
RawContextKey
<
boolean
>
(
'
editorTabMovesFocus
'
,
false
);
export
const
TabDoesNotMoveFocus
:
ContextKeyExpr
=
TabMovesFocus
.
toNegated
();
/**
* A context key that is set to the language associated with the model associated with the editor.
*/
export
const
LanguageId
=
new
RawContextKey
<
string
>
(
'
editorLangId
'
,
undefined
);
};
export
const
focus
=
new
RawContextKey
<
boolean
>
(
'
editorFocus
'
,
false
);
export
const
readOnly
=
new
RawContextKey
<
boolean
>
(
'
editorReadonly
'
,
false
);
export
const
writable
:
ContextKeyExpr
=
readOnly
.
toNegated
();
export
const
hasNonEmptySelection
=
new
RawContextKey
<
boolean
>
(
'
editorHasSelection
'
,
false
);
export
const
hasOnlyEmptySelection
:
ContextKeyExpr
=
hasNonEmptySelection
.
toNegated
();
export
const
hasMultipleSelections
=
new
RawContextKey
<
boolean
>
(
'
editorHasMultipleSelections
'
,
false
);
export
const
hasSingleSelection
:
ContextKeyExpr
=
hasMultipleSelections
.
toNegated
();
export
const
tabMovesFocus
=
new
RawContextKey
<
boolean
>
(
'
editorTabMovesFocus
'
,
false
);
export
const
tabDoesNotMoveFocus
:
ContextKeyExpr
=
tabMovesFocus
.
toNegated
();
export
const
isInEmbeddedEditor
=
new
RawContextKey
<
boolean
>
(
'
isInEmbeddedEditor
'
,
undefined
);
export
namespace
ModeContextKeys
{
// -- mode context keys
export
const
languageId
=
new
RawContextKey
<
string
>
(
'
editorLangId
'
,
undefined
);
export
const
hasCompletionItemProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasCompletionItemProvider
'
,
undefined
);
export
const
hasCodeActionsProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasCodeActionsProvider
'
,
undefined
);
export
const
hasCodeLensProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasCodeLensProvider
'
,
undefined
);
...
...
@@ -53,5 +42,4 @@ export namespace ModeContextKeys {
export
const
hasDocumentFormattingProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasDocumentFormattingProvider
'
,
undefined
);
export
const
hasDocumentSelectionFormattingProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasDocumentSelectionFormattingProvider
'
,
undefined
);
export
const
hasSignatureHelpProvider
=
new
RawContextKey
<
boolean
>
(
'
editorHasSignatureHelpProvider
'
,
undefined
);
export
const
isInEmbeddedEditor
=
new
RawContextKey
<
boolean
>
(
'
isInEmbeddedEditor
'
,
undefined
);
}
};
src/vs/editor/common/modes/editorModeContext.ts
浏览文件 @
8cb7cc0c
...
...
@@ -8,7 +8,7 @@ import { Disposable } from 'vs/base/common/lifecycle';
import
{
IContextKey
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
*
as
modes
from
'
vs/editor/common/modes
'
;
import
{
ICommonCodeEditor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
export
class
EditorModeContext
extends
Disposable
{
...
...
@@ -39,22 +39,22 @@ export class EditorModeContext extends Disposable {
super
();
this
.
_editor
=
editor
;
this
.
_langId
=
EditorContextKeys
.
L
anguageId
.
bindTo
(
contextKeyService
);
this
.
_hasCompletionItemProvider
=
Mode
ContextKeys
.
hasCompletionItemProvider
.
bindTo
(
contextKeyService
);
this
.
_hasCodeActionsProvider
=
Mode
ContextKeys
.
hasCodeActionsProvider
.
bindTo
(
contextKeyService
);
this
.
_hasCodeLensProvider
=
Mode
ContextKeys
.
hasCodeLensProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDefinitionProvider
=
Mode
ContextKeys
.
hasDefinitionProvider
.
bindTo
(
contextKeyService
);
this
.
_hasImplementationProvider
=
Mode
ContextKeys
.
hasImplementationProvider
.
bindTo
(
contextKeyService
);
this
.
_hasTypeDefinitionProvider
=
Mode
ContextKeys
.
hasTypeDefinitionProvider
.
bindTo
(
contextKeyService
);
this
.
_hasHoverProvider
=
Mode
ContextKeys
.
hasHoverProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentHighlightProvider
=
Mode
ContextKeys
.
hasDocumentHighlightProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentSymbolProvider
=
Mode
ContextKeys
.
hasDocumentSymbolProvider
.
bindTo
(
contextKeyService
);
this
.
_hasReferenceProvider
=
Mode
ContextKeys
.
hasReferenceProvider
.
bindTo
(
contextKeyService
);
this
.
_hasRenameProvider
=
Mode
ContextKeys
.
hasRenameProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentFormattingProvider
=
Mode
ContextKeys
.
hasDocumentFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentSelectionFormattingProvider
=
Mode
ContextKeys
.
hasDocumentSelectionFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasSignatureHelpProvider
=
Mode
ContextKeys
.
hasSignatureHelpProvider
.
bindTo
(
contextKeyService
);
this
.
_isInWalkThrough
=
Mode
ContextKeys
.
isInEmbeddedEditor
.
bindTo
(
contextKeyService
);
this
.
_langId
=
EditorContextKeys
.
l
anguageId
.
bindTo
(
contextKeyService
);
this
.
_hasCompletionItemProvider
=
Editor
ContextKeys
.
hasCompletionItemProvider
.
bindTo
(
contextKeyService
);
this
.
_hasCodeActionsProvider
=
Editor
ContextKeys
.
hasCodeActionsProvider
.
bindTo
(
contextKeyService
);
this
.
_hasCodeLensProvider
=
Editor
ContextKeys
.
hasCodeLensProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDefinitionProvider
=
Editor
ContextKeys
.
hasDefinitionProvider
.
bindTo
(
contextKeyService
);
this
.
_hasImplementationProvider
=
Editor
ContextKeys
.
hasImplementationProvider
.
bindTo
(
contextKeyService
);
this
.
_hasTypeDefinitionProvider
=
Editor
ContextKeys
.
hasTypeDefinitionProvider
.
bindTo
(
contextKeyService
);
this
.
_hasHoverProvider
=
Editor
ContextKeys
.
hasHoverProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentHighlightProvider
=
Editor
ContextKeys
.
hasDocumentHighlightProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentSymbolProvider
=
Editor
ContextKeys
.
hasDocumentSymbolProvider
.
bindTo
(
contextKeyService
);
this
.
_hasReferenceProvider
=
Editor
ContextKeys
.
hasReferenceProvider
.
bindTo
(
contextKeyService
);
this
.
_hasRenameProvider
=
Editor
ContextKeys
.
hasRenameProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentFormattingProvider
=
Editor
ContextKeys
.
hasDocumentFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasDocumentSelectionFormattingProvider
=
Editor
ContextKeys
.
hasDocumentSelectionFormattingProvider
.
bindTo
(
contextKeyService
);
this
.
_hasSignatureHelpProvider
=
Editor
ContextKeys
.
hasSignatureHelpProvider
.
bindTo
(
contextKeyService
);
this
.
_isInWalkThrough
=
Editor
ContextKeys
.
isInEmbeddedEditor
.
bindTo
(
contextKeyService
);
const
update
=
()
=>
this
.
_update
();
...
...
src/vs/editor/contrib/accessibility/browser/accessibility.ts
浏览文件 @
8cb7cc0c
...
...
@@ -207,7 +207,7 @@ class ShowAccessibilityHelpAction extends EditorAction {
alias
:
'
Show Accessibility Help
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
F1
}
});
...
...
@@ -229,7 +229,7 @@ CommonEditorRegistry.registerEditorCommand(new AccessibilityHelpCommand({
handler
:
x
=>
x
.
hide
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
100
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
}));
...
...
src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts
浏览文件 @
8cb7cc0c
...
...
@@ -25,7 +25,7 @@ class SelectBracketAction extends EditorAction {
alias
:
'
Go to Bracket
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
US_BACKSLASH
}
});
...
...
src/vs/editor/contrib/caretOperations/common/caretOperations.ts
浏览文件 @
8cb7cc0c
...
...
@@ -40,7 +40,7 @@ class MoveCaretLeftAction extends MoveCaretAction {
id
:
'
editor.action.moveCarretLeftAction
'
,
label
:
nls
.
localize
(
'
caret.moveLeft
'
,
"
Move Caret Left
"
),
alias
:
'
Move Caret Left
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -52,7 +52,7 @@ class MoveCaretRightAction extends MoveCaretAction {
id
:
'
editor.action.moveCarretRightAction
'
,
label
:
nls
.
localize
(
'
caret.moveRight
'
,
"
Move Caret Right
"
),
alias
:
'
Move Caret Right
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
src/vs/editor/contrib/caretOperations/common/transpose.ts
浏览文件 @
8cb7cc0c
...
...
@@ -20,9 +20,9 @@ class TransposeLettersAction extends EditorAction {
id
:
'
editor.action.transposeLetters
'
,
label
:
nls
.
localize
(
'
transposeLetters.label
'
,
"
Transpose Letters
"
),
alias
:
'
Transpose Letters
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
0
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_T
...
...
src/vs/editor/contrib/clipboard/browser/clipboard.ts
浏览文件 @
8cb7cc0c
...
...
@@ -67,9 +67,9 @@ class ExecCommandCutAction extends ExecCommandAction {
id
:
'
editor.action.clipboardCutAction
'
,
label
:
nls
.
localize
(
'
actions.clipboard.cutLabel
'
,
"
Cut
"
),
alias
:
'
Cut
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_X
,
win
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_X
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Delete
]
}
},
...
...
@@ -101,7 +101,7 @@ class ExecCommandCopyAction extends ExecCommandAction {
alias
:
'
Copy
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_C
,
win
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_C
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyCode
.
Insert
]
}
},
...
...
@@ -131,9 +131,9 @@ class ExecCommandPasteAction extends ExecCommandAction {
id
:
'
editor.action.clipboardPasteAction
'
,
label
:
nls
.
localize
(
'
actions.clipboard.pasteLabel
'
,
"
Paste
"
),
alias
:
'
Paste
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_V
,
win
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_V
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Insert
]
}
},
...
...
@@ -155,7 +155,7 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends ExecCommandAction {
alias
:
'
Copy With Syntax Highlighting
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
null
}
});
...
...
src/vs/editor/contrib/comment/common/comment.ts
浏览文件 @
8cb7cc0c
...
...
@@ -47,9 +47,9 @@ class ToggleCommentLineAction extends CommentLineAction {
id
:
'
editor.action.commentLine
'
,
label
:
nls
.
localize
(
'
comment.line
'
,
"
Toggle Line Comment
"
),
alias
:
'
Toggle Line Comment
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
US_SLASH
}
});
...
...
@@ -63,9 +63,9 @@ class AddLineCommentAction extends CommentLineAction {
id
:
'
editor.action.addCommentLine
'
,
label
:
nls
.
localize
(
'
comment.line.add
'
,
"
Add Line Comment
"
),
alias
:
'
Add Line Comment
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_C
)
}
});
...
...
@@ -79,9 +79,9 @@ class RemoveLineCommentAction extends CommentLineAction {
id
:
'
editor.action.removeCommentLine
'
,
label
:
nls
.
localize
(
'
comment.line.remove
'
,
"
Remove Line Comment
"
),
alias
:
'
Remove Line Comment
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_U
)
}
});
...
...
@@ -96,9 +96,9 @@ class BlockCommentAction extends EditorAction {
id
:
'
editor.action.blockComment
'
,
label
:
nls
.
localize
(
'
comment.block
'
,
"
Toggle Block Comment
"
),
alias
:
'
Toggle Block Comment
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
KEY_A
,
linux
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_A
}
}
...
...
src/vs/editor/contrib/contextmenu/browser/contextmenu.ts
浏览文件 @
8cb7cc0c
...
...
@@ -227,7 +227,7 @@ class ShowContextMenu extends EditorAction {
alias
:
'
Show Editor Context Menu
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F10
}
});
...
...
src/vs/editor/contrib/find/common/findController.ts
浏览文件 @
8cb7cc0c
...
...
@@ -339,7 +339,7 @@ export class NextMatchFindAction extends MatchFindAction {
alias
:
'
Find Next
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
F3
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_G
,
secondary
:
[
KeyCode
.
F3
]
}
}
...
...
@@ -361,7 +361,7 @@ export class PreviousMatchFindAction extends MatchFindAction {
alias
:
'
Find Previous
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F3
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_G
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
F3
]
}
}
...
...
@@ -407,7 +407,7 @@ export class NextSelectionMatchFindAction extends SelectionMatchFindAction {
alias
:
'
Find Next Selection
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
F3
}
});
...
...
@@ -428,7 +428,7 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction {
alias
:
'
Find Previous Selection
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
F3
}
});
...
...
@@ -608,7 +608,7 @@ export class AddSelectionToNextFindMatchAction extends SelectNextFindMatchAction
alias
:
'
Add Selection To Next Find Match
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_D
}
});
...
...
@@ -714,7 +714,7 @@ export class MoveSelectionToNextFindMatchAction extends SelectNextFindMatchActio
alias
:
'
Move Last Selection To Next Find Match
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_D
)
}
});
...
...
@@ -797,7 +797,7 @@ export class SelectHighlightsAction extends AbstractSelectHighlightsAction {
alias
:
'
Select All Occurrences of Find Match
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_L
}
});
...
...
@@ -811,9 +811,9 @@ export class CompatChangeAll extends AbstractSelectHighlightsAction {
id
:
'
editor.action.changeAll
'
,
label
:
nls
.
localize
(
'
changeAll.label
'
,
"
Change All Occurrences
"
),
alias
:
'
Change All Occurrences
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
F2
},
menuOpts
:
{
...
...
@@ -1016,7 +1016,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
closeFindWidget
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
@@ -1028,7 +1028,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
toggleCaseSensitive
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
ToggleCaseSensitiveKeybinding
.
primary
,
mac
:
ToggleCaseSensitiveKeybinding
.
mac
,
win
:
ToggleCaseSensitiveKeybinding
.
win
,
...
...
@@ -1042,7 +1042,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
toggleWholeWords
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
ToggleWholeWordKeybinding
.
primary
,
mac
:
ToggleWholeWordKeybinding
.
mac
,
win
:
ToggleWholeWordKeybinding
.
win
,
...
...
@@ -1056,7 +1056,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
toggleRegex
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
ToggleRegexKeybinding
.
primary
,
mac
:
ToggleRegexKeybinding
.
mac
,
win
:
ToggleRegexKeybinding
.
win
,
...
...
@@ -1070,7 +1070,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
replace
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_1
}
}));
...
...
@@ -1081,7 +1081,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
replaceAll
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyCode
.
Enter
}
}));
...
...
@@ -1092,7 +1092,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
selectAllMatches
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
Enter
}
}));
...
...
@@ -1103,7 +1103,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
showPreviousFindTerm
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
ContextKeyExpr
.
and
(
CONTEXT_FIND_INPUT_FOCUSSED
,
EditorContextKeys
.
F
ocus
),
kbExpr
:
ContextKeyExpr
.
and
(
CONTEXT_FIND_INPUT_FOCUSSED
,
EditorContextKeys
.
f
ocus
),
primary
:
ShowPreviousFindTermKeybinding
.
primary
,
mac
:
ShowPreviousFindTermKeybinding
.
mac
,
win
:
ShowPreviousFindTermKeybinding
.
win
,
...
...
@@ -1117,7 +1117,7 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({
handler
:
x
=>
x
.
showNextFindTerm
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
5
),
kbExpr
:
ContextKeyExpr
.
and
(
CONTEXT_FIND_INPUT_FOCUSSED
,
EditorContextKeys
.
F
ocus
),
kbExpr
:
ContextKeyExpr
.
and
(
CONTEXT_FIND_INPUT_FOCUSSED
,
EditorContextKeys
.
f
ocus
),
primary
:
ShowNextFindTermKeybinding
.
primary
,
mac
:
ShowNextFindTermKeybinding
.
mac
,
win
:
ShowNextFindTermKeybinding
.
win
,
...
...
src/vs/editor/contrib/folding/browser/folding.ts
浏览文件 @
8cb7cc0c
...
...
@@ -541,7 +541,7 @@ class UnfoldAction extends FoldingAction<FoldingArguments> {
alias
:
'
Unfold
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
US_CLOSE_SQUARE_BRACKET
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyCode
.
US_CLOSE_SQUARE_BRACKET
...
...
@@ -577,7 +577,7 @@ class UnFoldRecursivelyAction extends FoldingAction<void> {
alias
:
'
Unfold Recursively
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
US_CLOSE_SQUARE_BRACKET
)
}
});
...
...
@@ -598,7 +598,7 @@ class FoldAction extends FoldingAction<FoldingArguments> {
alias
:
'
Fold
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
US_OPEN_SQUARE_BRACKET
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyCode
.
US_OPEN_SQUARE_BRACKET
...
...
@@ -636,7 +636,7 @@ class FoldRecursivelyAction extends FoldingAction<void> {
alias
:
'
Fold Recursively
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
US_OPEN_SQUARE_BRACKET
)
}
});
...
...
@@ -657,7 +657,7 @@ class FoldAllAction extends FoldingAction<void> {
alias
:
'
Fold All
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_0
)
}
});
...
...
@@ -678,7 +678,7 @@ class UnfoldAllAction extends FoldingAction<void> {
alias
:
'
Unfold All
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_J
)
}
});
...
...
@@ -714,7 +714,7 @@ for (let i = 1; i <= 9; i++) {
alias
:
`Fold Level
${
i
}
`
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
(
KeyCode
.
KEY_0
+
i
))
}
})
...
...
src/vs/editor/contrib/format/browser/formatActions.ts
浏览文件 @
8cb7cc0c
...
...
@@ -22,7 +22,7 @@ import { CharacterSet } from 'vs/editor/common/core/characterClassifier';
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
alert
}
from
'
vs/base/browser/ui/aria/aria
'
;
import
{
EditorState
,
CodeEditorStateFlag
}
from
"
vs/editor/common/core/editorState
"
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
function
alertFormattingEdits
(
edits
:
editorCommon
.
ISingleEditOperation
[]):
void
{
...
...
@@ -296,9 +296,9 @@ export class FormatDocumentAction extends AbstractFormatAction {
id
:
'
editor.action.formatDocument
'
,
label
:
nls
.
localize
(
'
formatDocument.label
'
,
"
Format Document
"
),
alias
:
'
Format Document
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
Writable
,
Mode
ContextKeys
.
hasDocumentFormattingProvider
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
writable
,
Editor
ContextKeys
.
hasDocumentFormattingProvider
),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
KEY_F
,
// secondary: [KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_D)],
linux
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_I
}
...
...
@@ -325,9 +325,9 @@ export class FormatSelectionAction extends AbstractFormatAction {
id
:
'
editor.action.formatSelection
'
,
label
:
nls
.
localize
(
'
formatSelection.label
'
,
"
Format Selection
"
),
alias
:
'
Format Code
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
Writable
,
ModeContextKeys
.
hasDocumentSelectionFormattingProvider
,
EditorContextKeys
.
H
asNonEmptySelection
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
writable
,
EditorContextKeys
.
hasDocumentSelectionFormattingProvider
,
EditorContextKeys
.
h
asNonEmptySelection
),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_F
)
},
menuOpts
:
{
...
...
src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts
浏览文件 @
8cb7cc0c
...
...
@@ -35,7 +35,7 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import
{
ITextModelResolverService
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
MessageController
}
from
'
./messageController
'
;
import
*
as
corePosition
from
'
vs/editor/common/core/position
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
ICursorSelectionChangedEvent
}
from
"
vs/editor/common/controller/cursorEvents
"
;
import
{
registerThemingParticipant
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
editorActiveLinkForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
...
...
@@ -181,10 +181,10 @@ export class GoToDefinitionAction extends DefinitionAction {
label
:
nls
.
localize
(
'
actions.goToDecl.label
'
,
"
Go to Definition
"
),
alias
:
'
Go to Definition
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasDefinitionProvider
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
hasDefinitionProvider
,
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
goToDeclarationKb
},
menuOpts
:
{
...
...
@@ -206,10 +206,10 @@ export class OpenDefinitionToSideAction extends DefinitionAction {
label
:
nls
.
localize
(
'
actions.goToDeclToSide.label
'
,
"
Open Definition to the Side
"
),
alias
:
'
Open Definition to the Side
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasDefinitionProvider
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
hasDefinitionProvider
,
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
goToDeclarationKb
)
}
});
...
...
@@ -224,11 +224,11 @@ export class PeekDefinitionAction extends DefinitionAction {
label
:
nls
.
localize
(
'
actions.previewDecl.label
'
,
"
Peek Definition
"
),
alias
:
'
Peek Definition
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasDefinitionProvider
,
Editor
ContextKeys
.
hasDefinitionProvider
,
PeekContext
.
notInPeekEditor
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
F12
,
linux
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
F10
}
},
...
...
@@ -267,10 +267,10 @@ export class GoToImplementationAction extends ImplementationAction {
label
:
nls
.
localize
(
'
actions.goToImplementation.label
'
,
"
Go to Implementation
"
),
alias
:
'
Go to Implementation
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasImplementationProvider
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
hasImplementationProvider
,
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
F12
},
menuOpts
:
{
...
...
@@ -292,10 +292,10 @@ export class PeekImplementationAction extends ImplementationAction {
label
:
nls
.
localize
(
'
actions.peekImplementation.label
'
,
"
Peek Implementation
"
),
alias
:
'
Peek Implementation
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasImplementationProvider
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
hasImplementationProvider
,
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
F12
}
});
...
...
@@ -329,10 +329,10 @@ export class GoToTypeDefintionAction extends TypeDefinitionAction {
label
:
nls
.
localize
(
'
actions.goToTypeDefinition.label
'
,
"
Go to Type Definition
"
),
alias
:
'
Go to Type Definition
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasTypeDefinitionProvider
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
hasTypeDefinitionProvider
,
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
0
},
menuOpts
:
{
...
...
@@ -354,10 +354,10 @@ export class PeekTypeDefinitionAction extends TypeDefinitionAction {
label
:
nls
.
localize
(
'
actions.peekTypeDefinition.label
'
,
"
Peek Type Definition
"
),
alias
:
'
Peek Type Definition
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasTypeDefinitionProvider
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
hasTypeDefinitionProvider
,
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
0
}
});
...
...
src/vs/editor/contrib/gotoError/browser/gotoError.ts
浏览文件 @
8cb7cc0c
...
...
@@ -434,9 +434,9 @@ class NextMarkerAction extends MarkerNavigationAction {
id
:
'
editor.action.marker.next
'
,
label
:
nls
.
localize
(
'
markerAction.next.label
'
,
"
Go to Next Error or Warning
"
),
alias
:
'
Go to Next Error or Warning
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
F8
}
});
...
...
@@ -450,9 +450,9 @@ class PrevMarkerAction extends MarkerNavigationAction {
id
:
'
editor.action.marker.prev
'
,
label
:
nls
.
localize
(
'
markerAction.previous.label
'
,
"
Go to Previous Error or Warning
"
),
alias
:
'
Go to Previous Error or Warning
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F8
}
});
...
...
@@ -469,7 +469,7 @@ CommonEditorRegistry.registerEditorCommand(new MarkerCommand({
handler
:
x
=>
x
.
closeMarkersNavigation
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
50
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
src/vs/editor/contrib/hover/browser/hover.ts
浏览文件 @
8cb7cc0c
...
...
@@ -155,7 +155,7 @@ class ShowHoverAction extends EditorAction {
alias
:
'
Show Hover
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_I
)
}
});
...
...
src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts
浏览文件 @
8cb7cc0c
...
...
@@ -138,9 +138,9 @@ class InPlaceReplaceUp extends EditorAction {
id
:
'
editor.action.inPlaceReplace.up
'
,
label
:
nls
.
localize
(
'
InPlaceReplaceAction.previous.label
'
,
"
Replace with Previous Value
"
),
alias
:
'
Replace with Previous Value
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
US_COMMA
}
});
...
...
@@ -163,9 +163,9 @@ class InPlaceReplaceDown extends EditorAction {
id
:
'
editor.action.inPlaceReplace.down
'
,
label
:
nls
.
localize
(
'
InPlaceReplaceAction.next.label
'
,
"
Replace with Next Value
"
),
alias
:
'
Replace with Next Value
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
US_DOT
}
});
...
...
src/vs/editor/contrib/indentation/common/indentation.ts
浏览文件 @
8cb7cc0c
...
...
@@ -153,7 +153,7 @@ export class IndentationToSpacesAction extends EditorAction {
id
:
IndentationToSpacesAction
.
ID
,
label
:
nls
.
localize
(
'
indentationToSpaces
'
,
"
Convert Indentation to Spaces
"
),
alias
:
'
Convert Indentation to Spaces
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
@@ -180,7 +180,7 @@ export class IndentationToTabsAction extends EditorAction {
id
:
IndentationToTabsAction
.
ID
,
label
:
nls
.
localize
(
'
indentationToTabs
'
,
"
Convert Indentation to Tabs
"
),
alias
:
'
Convert Indentation to Tabs
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
@@ -301,7 +301,7 @@ export class ReindentLinesAction extends EditorAction {
id
:
'
editor.action.reindentlines
'
,
label
:
nls
.
localize
(
'
editor.reindentlines
'
,
"
Reindent Lines
"
),
alias
:
'
Reindent Lines
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
src/vs/editor/contrib/linesOperations/common/linesOperations.ts
浏览文件 @
8cb7cc0c
...
...
@@ -50,9 +50,9 @@ class CopyLinesUpAction extends AbstractCopyLinesAction {
id
:
'
editor.action.copyLinesUpAction
'
,
label
:
nls
.
localize
(
'
lines.copyUp
'
,
"
Copy Line Up
"
),
alias
:
'
Copy Line Up
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Alt
|
KeyMod
.
Shift
|
KeyCode
.
UpArrow
,
linux
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyMod
.
Shift
|
KeyCode
.
UpArrow
}
}
...
...
@@ -67,9 +67,9 @@ class CopyLinesDownAction extends AbstractCopyLinesAction {
id
:
'
editor.action.copyLinesDownAction
'
,
label
:
nls
.
localize
(
'
lines.copyDown
'
,
"
Copy Line Down
"
),
alias
:
'
Copy Line Down
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Alt
|
KeyMod
.
Shift
|
KeyCode
.
DownArrow
,
linux
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyMod
.
Shift
|
KeyCode
.
DownArrow
}
}
...
...
@@ -108,9 +108,9 @@ class MoveLinesUpAction extends AbstractMoveLinesAction {
id
:
'
editor.action.moveLinesUpAction
'
,
label
:
nls
.
localize
(
'
lines.moveUp
'
,
"
Move Line Up
"
),
alias
:
'
Move Line Up
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
UpArrow
,
linux
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
UpArrow
}
}
...
...
@@ -125,9 +125,9 @@ class MoveLinesDownAction extends AbstractMoveLinesAction {
id
:
'
editor.action.moveLinesDownAction
'
,
label
:
nls
.
localize
(
'
lines.moveDown
'
,
"
Move Line Down
"
),
alias
:
'
Move Line Down
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Alt
|
KeyCode
.
DownArrow
,
linux
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
DownArrow
}
}
...
...
@@ -162,7 +162,7 @@ class SortLinesAscendingAction extends AbstractSortLinesAction {
id
:
'
editor.action.sortLinesAscending
'
,
label
:
nls
.
localize
(
'
lines.sortAscending
'
,
"
Sort Lines Ascending
"
),
alias
:
'
Sort Lines Ascending
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -174,7 +174,7 @@ class SortLinesDescendingAction extends AbstractSortLinesAction {
id
:
'
editor.action.sortLinesDescending
'
,
label
:
nls
.
localize
(
'
lines.sortDescending
'
,
"
Sort Lines Descending
"
),
alias
:
'
Sort Lines Descending
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -189,9 +189,9 @@ export class TrimTrailingWhitespaceAction extends EditorAction {
id
:
TrimTrailingWhitespaceAction
.
ID
,
label
:
nls
.
localize
(
'
lines.trimTrailingWhitespace
'
,
"
Trim Trailing Whitespace
"
),
alias
:
'
Trim Trailing Whitespace
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_X
)
}
});
...
...
@@ -263,9 +263,9 @@ class DeleteLinesAction extends AbstractRemoveLinesAction {
id
:
'
editor.action.deleteLines
'
,
label
:
nls
.
localize
(
'
lines.delete
'
,
"
Delete Line
"
),
alias
:
'
Delete Line
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_K
}
});
...
...
@@ -291,10 +291,10 @@ class IndentLinesAction extends HandlerEditorAction {
id
:
'
editor.action.indentLines
'
,
label
:
nls
.
localize
(
'
lines.indent
'
,
"
Indent Line
"
),
alias
:
'
Indent Line
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
handlerId
:
Handler
.
Indent
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
US_CLOSE_SQUARE_BRACKET
}
});
...
...
@@ -308,10 +308,10 @@ class OutdentLinesAction extends HandlerEditorAction {
id
:
'
editor.action.outdentLines
'
,
label
:
nls
.
localize
(
'
lines.outdent
'
,
"
Outdent Line
"
),
alias
:
'
Outdent Line
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
handlerId
:
Handler
.
Outdent
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
US_OPEN_SQUARE_BRACKET
}
});
...
...
@@ -325,10 +325,10 @@ class InsertLineBeforeAction extends HandlerEditorAction {
id
:
'
editor.action.insertLineBefore
'
,
label
:
nls
.
localize
(
'
lines.insertBefore
'
,
"
Insert Line Above
"
),
alias
:
'
Insert Line Above
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
handlerId
:
Handler
.
LineInsertBefore
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
Enter
}
});
...
...
@@ -342,10 +342,10 @@ class InsertLineAfterAction extends HandlerEditorAction {
id
:
'
editor.action.insertLineAfter
'
,
label
:
nls
.
localize
(
'
lines.insertAfter
'
,
"
Insert Line Below
"
),
alias
:
'
Insert Line Below
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
handlerId
:
Handler
.
LineInsertAfter
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Enter
}
});
...
...
@@ -396,9 +396,9 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction {
id
:
'
deleteAllLeft
'
,
label
:
nls
.
localize
(
'
lines.deleteAllLeft
'
,
"
Delete All Left
"
),
alias
:
'
Delete All Left
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
null
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Backspace
}
}
...
...
@@ -450,9 +450,9 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction {
id
:
'
deleteAllRight
'
,
label
:
nls
.
localize
(
'
lines.deleteAllRight
'
,
"
Delete All Right
"
),
alias
:
'
Delete All Right
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
null
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_K
,
secondary
:
[
KeyMod
.
CtrlCmd
|
KeyCode
.
Delete
]
}
}
...
...
@@ -508,9 +508,9 @@ export class JoinLinesAction extends EditorAction {
id
:
'
editor.action.joinLines
'
,
label
:
nls
.
localize
(
'
lines.joinLines
'
,
"
Join Lines
"
),
alias
:
'
Join Lines
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
0
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_J
}
}
...
...
@@ -656,7 +656,7 @@ export class TransposeAction extends EditorAction {
id
:
'
editor.action.transpose
'
,
label
:
nls
.
localize
(
'
editor.transpose
'
,
"
Transpose characters around the cursor
"
),
alias
:
'
Transpose characters around the cursor
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
@@ -738,7 +738,7 @@ export class UpperCaseAction extends AbstractCaseAction {
id
:
'
editor.action.transformToUppercase
'
,
label
:
nls
.
localize
(
'
editor.transformToUppercase
'
,
"
Transform to Uppercase
"
),
alias
:
'
Transform to Uppercase
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
@@ -754,7 +754,7 @@ export class LowerCaseAction extends AbstractCaseAction {
id
:
'
editor.action.transformToLowercase
'
,
label
:
nls
.
localize
(
'
editor.transformToLowercase
'
,
"
Transform to Lowercase
"
),
alias
:
'
Transform to Lowercase
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
src/vs/editor/contrib/multicursor/common/multicursor.ts
浏览文件 @
8cb7cc0c
...
...
@@ -21,7 +21,7 @@ class InsertCursorAbove extends HandlerEditorAction {
precondition
:
null
,
handlerId
:
Handler
.
AddCursorUp
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyCode
.
UpArrow
,
linux
:
{
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
UpArrow
,
...
...
@@ -42,7 +42,7 @@ class InsertCursorBelow extends HandlerEditorAction {
precondition
:
null
,
handlerId
:
Handler
.
AddCursorDown
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Alt
|
KeyCode
.
DownArrow
,
linux
:
{
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
DownArrow
,
...
...
@@ -63,7 +63,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
alias
:
'
Add Cursors to Line Ends
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
KEY_I
}
});
...
...
src/vs/editor/contrib/parameterHints/browser/parameterHints.ts
浏览文件 @
8cb7cc0c
...
...
@@ -9,7 +9,7 @@ import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import
{
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ICommonCodeEditor
,
IEditorContribution
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
editorAction
,
ServicesAccessor
,
EditorAction
,
EditorCommand
,
CommonEditorRegistry
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
...
...
@@ -67,9 +67,9 @@ export class TriggerParameterHintsAction extends EditorAction {
id
:
'
editor.action.triggerParameterHints
'
,
label
:
nls
.
localize
(
'
parameterHints.trigger.label
'
,
"
Trigger Parameter Hints
"
),
alias
:
'
Trigger Parameter Hints
'
,
precondition
:
Mode
ContextKeys
.
hasSignatureHelpProvider
,
precondition
:
Editor
ContextKeys
.
hasSignatureHelpProvider
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
Space
}
});
...
...
@@ -93,7 +93,7 @@ CommonEditorRegistry.registerEditorCommand(new ParameterHintsCommand({
handler
:
x
=>
x
.
cancel
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
@@ -104,7 +104,7 @@ CommonEditorRegistry.registerEditorCommand(new ParameterHintsCommand({
handler
:
x
=>
x
.
previous
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
UpArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
UpArrow
],
mac
:
{
primary
:
KeyCode
.
UpArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
UpArrow
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_P
]
}
...
...
@@ -116,7 +116,7 @@ CommonEditorRegistry.registerEditorCommand(new ParameterHintsCommand({
handler
:
x
=>
x
.
next
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
DownArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
DownArrow
],
mac
:
{
primary
:
KeyCode
.
DownArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
DownArrow
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_N
]
}
...
...
src/vs/editor/contrib/quickFix/browser/quickFixCommands.ts
浏览文件 @
8cb7cc0c
...
...
@@ -13,7 +13,7 @@ import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/commo
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IMarkerService
}
from
'
vs/platform/markers/common/markers
'
;
import
{
ICommonCodeEditor
,
IEditorContribution
,
IReadOnlyModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
editorAction
,
ServicesAccessor
,
EditorAction
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
...
...
@@ -120,9 +120,9 @@ export class QuickFixAction extends EditorAction {
id
:
QuickFixAction
.
Id
,
label
:
nls
.
localize
(
'
quickfix.trigger.label
'
,
"
Quick Fix
"
),
alias
:
'
Quick Fix
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
Writable
,
Mode
ContextKeys
.
hasCodeActionsProvider
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
writable
,
Editor
ContextKeys
.
hasCodeActionsProvider
),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
US_DOT
}
});
...
...
src/vs/editor/contrib/quickOpen/browser/gotoLine.ts
浏览文件 @
8cb7cc0c
...
...
@@ -151,7 +151,7 @@ export class GotoLineAction extends BaseEditorQuickOpenAction {
alias
:
'
Go to Line...
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_G
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_G
}
}
...
...
src/vs/editor/contrib/quickOpen/browser/quickCommand.ts
浏览文件 @
8cb7cc0c
...
...
@@ -78,7 +78,7 @@ export class QuickCommandAction extends BaseEditorQuickOpenAction {
alias
:
'
Command Palette
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
(
browser
.
isIE
?
KeyMod
.
Alt
|
KeyCode
.
F1
:
KeyCode
.
F1
)
},
menuOpts
:
{
...
...
src/vs/editor/contrib/quickOpen/browser/quickOutline.ts
浏览文件 @
8cb7cc0c
...
...
@@ -14,7 +14,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import
{
IContext
,
IHighlight
,
QuickOpenEntryGroup
,
QuickOpenModel
}
from
'
vs/base/parts/quickopen/browser/quickOpenModel
'
;
import
{
IAutoFocus
,
Mode
}
from
'
vs/base/parts/quickopen/common/quickOpen
'
;
import
{
ICommonCodeEditor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
SymbolInformation
,
DocumentSymbolProviderRegistry
,
symbolKindToCssClass
}
from
'
vs/editor/common/modes
'
;
import
{
BaseEditorQuickOpenAction
,
IDecorator
}
from
'
./editorQuickOpen
'
;
import
{
getDocumentSymbols
,
IOutline
}
from
'
vs/editor/contrib/quickOpen/common/quickOpen
'
;
...
...
@@ -117,9 +117,9 @@ export class QuickOutlineAction extends BaseEditorQuickOpenAction {
id
:
'
editor.action.quickOutline
'
,
label
:
nls
.
localize
(
'
QuickOutlineAction.label
'
,
"
Go to Symbol...
"
),
alias
:
'
Go to Symbol...
'
,
precondition
:
Mode
ContextKeys
.
hasDocumentSymbolProvider
,
precondition
:
Editor
ContextKeys
.
hasDocumentSymbolProvider
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
KEY_O
},
menuOpts
:
{
...
...
src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts
浏览文件 @
8cb7cc0c
...
...
@@ -23,7 +23,7 @@ import { ReferencesController, RequestOptions, ctxReferenceSearchVisible } from
import
{
ReferencesModel
}
from
'
./referencesModel
'
;
import
{
asWinJsPromise
}
from
'
vs/base/common/async
'
;
import
{
onUnexpectedExternalError
}
from
'
vs/base/common/errors
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
const
defaultReferenceSearchOptions
:
RequestOptions
=
{
getMetaTitle
(
model
)
{
...
...
@@ -63,11 +63,11 @@ export class ReferenceAction extends EditorAction {
label
:
nls
.
localize
(
'
references.action.label
'
,
"
Find All References
"
),
alias
:
'
Find All References
'
,
precondition
:
ContextKeyExpr
.
and
(
Mode
ContextKeys
.
hasReferenceProvider
,
Editor
ContextKeys
.
hasReferenceProvider
,
PeekContext
.
notInPeekEditor
,
Mode
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
Editor
ContextKeys
.
isInEmbeddedEditor
.
toNegated
()),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F12
},
menuOpts
:
{
...
...
src/vs/editor/contrib/rename/browser/rename.ts
浏览文件 @
8cb7cc0c
...
...
@@ -17,7 +17,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress';
import
{
editorAction
,
ServicesAccessor
,
EditorAction
,
EditorCommand
,
CommonEditorRegistry
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
editorContribution
}
from
'
vs/editor/browser/editorBrowserExtensions
'
;
import
{
ICommonCodeEditor
,
IEditorContribution
,
IReadOnlyModel
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
BulkEdit
,
createBulkEdit
}
from
'
vs/editor/common/services/bulkEdit
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
RenameInputField
from
'
./renameInputField
'
;
...
...
@@ -216,9 +216,9 @@ export class RenameAction extends EditorAction {
id
:
'
editor.action.rename
'
,
label
:
nls
.
localize
(
'
rename.label
'
,
"
Rename Symbol
"
),
alias
:
'
Rename Symbol
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
Writable
,
Mode
ContextKeys
.
hasRenameProvider
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
writable
,
Editor
ContextKeys
.
hasRenameProvider
),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
F2
},
menuOpts
:
{
...
...
@@ -245,7 +245,7 @@ CommonEditorRegistry.registerEditorCommand(new RenameCommand({
handler
:
x
=>
x
.
acceptRenameInput
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
99
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
Enter
}
}));
...
...
@@ -256,7 +256,7 @@ CommonEditorRegistry.registerEditorCommand(new RenameCommand({
handler
:
x
=>
x
.
cancelRenameInput
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
99
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
src/vs/editor/contrib/smartSelect/common/smartSelect.ts
浏览文件 @
8cb7cc0c
...
...
@@ -172,7 +172,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
alias
:
'
Expand Select
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
RightArrow
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
WinCtrl
|
KeyMod
.
Shift
|
KeyCode
.
RightArrow
}
}
...
...
@@ -189,7 +189,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
alias
:
'
Shrink Select
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyMod
.
Alt
|
KeyCode
.
LeftArrow
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
WinCtrl
|
KeyMod
.
Shift
|
KeyCode
.
LeftArrow
}
}
...
...
src/vs/editor/contrib/snippet/common/snippetController.ts
浏览文件 @
8cb7cc0c
...
...
@@ -725,7 +725,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({
handler
:
x
=>
x
.
jumpToNextPlaceholder
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
30
),
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Tab
}
}));
...
...
@@ -735,7 +735,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({
handler
:
x
=>
x
.
jumpToPrevPlaceholder
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
30
),
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
Tab
}
}));
...
...
@@ -745,7 +745,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({
handler
:
x
=>
x
.
acceptSnippet
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
30
),
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Enter
}
}));
...
...
@@ -755,7 +755,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({
handler
:
x
=>
x
.
leaveSnippet
(),
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
30
),
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
src/vs/editor/contrib/suggest/browser/suggestController.ts
浏览文件 @
8cb7cc0c
...
...
@@ -14,7 +14,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
ContextKeyExpr
,
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ICommonCodeEditor
,
IEditorContribution
}
from
'
vs/editor/common/editorCommon
'
;
import
{
EditorContextKeys
,
ModeContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
EditorContextKeys
}
from
'
vs/editor/common/editorContextKeys
'
;
import
{
editorAction
,
ServicesAccessor
,
EditorAction
,
EditorCommand
,
CommonEditorRegistry
}
from
'
vs/editor/common/editorCommonExtensions
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
alert
}
from
'
vs/base/browser/ui/aria/aria
'
;
...
...
@@ -274,9 +274,9 @@ export class TriggerSuggestAction extends EditorAction {
id
:
'
editor.action.triggerSuggest
'
,
label
:
nls
.
localize
(
'
suggest.trigger.label
'
,
"
Trigger Suggest
"
),
alias
:
'
Trigger Suggest
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
Writable
,
Mode
ContextKeys
.
hasCompletionItemProvider
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
writable
,
Editor
ContextKeys
.
hasCompletionItemProvider
),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Space
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
Space
}
}
...
...
@@ -305,7 +305,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
x
=>
x
.
acceptSelectedSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Tab
}
}));
...
...
@@ -316,7 +316,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
x
=>
x
.
acceptSelectedSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
SuggestContext
.
AcceptSuggestionsOnEnter
),
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
t
extFocus
,
SuggestContext
.
AcceptSuggestionsOnEnter
),
primary
:
KeyCode
.
Enter
}
}));
...
...
@@ -327,7 +327,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
x
=>
x
.
cancelSuggestWidget
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
@@ -339,7 +339,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
c
=>
c
.
selectNextSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
DownArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
DownArrow
],
mac
:
{
primary
:
KeyCode
.
DownArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
DownArrow
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_N
]
}
...
...
@@ -352,7 +352,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
c
=>
c
.
selectNextPageSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
PageDown
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
PageDown
]
}
...
...
@@ -364,7 +364,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
c
=>
c
.
selectLastSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
End
}
}));
...
...
@@ -375,7 +375,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
c
=>
c
.
selectPrevSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
UpArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
UpArrow
],
mac
:
{
primary
:
KeyCode
.
UpArrow
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
UpArrow
,
KeyMod
.
WinCtrl
|
KeyCode
.
KEY_P
]
}
...
...
@@ -388,7 +388,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
c
=>
c
.
selectPrevPageSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
PageUp
,
secondary
:
[
KeyMod
.
Alt
|
KeyCode
.
PageUp
]
}
...
...
@@ -400,7 +400,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
c
=>
c
.
selectFirstSuggestion
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Home
}
}));
...
...
@@ -411,7 +411,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
x
=>
x
.
toggleSuggestionDetails
(),
kbOpts
:
{
weight
:
weight
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Space
,
mac
:
{
primary
:
KeyMod
.
WinCtrl
|
KeyCode
.
Space
}
}
...
...
src/vs/editor/contrib/wordOperations/common/wordOperations.ts
浏览文件 @
8cb7cc0c
...
...
@@ -94,7 +94,7 @@ export class CursorWordStartLeft extends WordLeftCommand {
id
:
'
cursorWordStartLeft
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
LeftArrow
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
LeftArrow
}
}
...
...
@@ -135,7 +135,7 @@ export class CursorWordStartLeftSelect extends WordLeftCommand {
id
:
'
cursorWordStartLeftSelect
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
LeftArrow
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyMod
.
Shift
|
KeyCode
.
LeftArrow
}
}
...
...
@@ -188,7 +188,7 @@ export class CursorWordEndRight extends WordRightCommand {
id
:
'
cursorWordEndRight
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
RightArrow
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
RightArrow
}
}
...
...
@@ -229,7 +229,7 @@ export class CursorWordEndRightSelect extends WordRightCommand {
id
:
'
cursorWordEndRightSelect
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyMod
.
Shift
|
KeyCode
.
RightArrow
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyMod
.
Shift
|
KeyCode
.
RightArrow
}
}
...
...
@@ -310,7 +310,7 @@ export class DeleteWordStartLeft extends DeleteWordLeftCommand {
whitespaceHeuristics
:
false
,
wordNavigationType
:
WordNavigationType
.
WordStart
,
id
:
'
deleteWordStartLeft
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -322,7 +322,7 @@ export class DeleteWordEndLeft extends DeleteWordLeftCommand {
whitespaceHeuristics
:
false
,
wordNavigationType
:
WordNavigationType
.
WordEnd
,
id
:
'
deleteWordEndLeft
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -334,9 +334,9 @@ export class DeleteWordLeft extends DeleteWordLeftCommand {
whitespaceHeuristics
:
true
,
wordNavigationType
:
WordNavigationType
.
WordStart
,
id
:
'
deleteWordLeft
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Backspace
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
Backspace
}
}
...
...
@@ -351,7 +351,7 @@ export class DeleteWordStartRight extends DeleteWordRightCommand {
whitespaceHeuristics
:
false
,
wordNavigationType
:
WordNavigationType
.
WordStart
,
id
:
'
deleteWordStartRight
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -363,7 +363,7 @@ export class DeleteWordEndRight extends DeleteWordRightCommand {
whitespaceHeuristics
:
false
,
wordNavigationType
:
WordNavigationType
.
WordEnd
,
id
:
'
deleteWordEndRight
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
}
...
...
@@ -375,9 +375,9 @@ export class DeleteWordRight extends DeleteWordRightCommand {
whitespaceHeuristics
:
true
,
wordNavigationType
:
WordNavigationType
.
WordEnd
,
id
:
'
deleteWordRight
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Delete
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
Delete
}
}
...
...
src/vs/workbench/browser/parts/editor/editorCommands.ts
浏览文件 @
8cb7cc0c
...
...
@@ -52,7 +52,7 @@ function registerActiveEditorMoveCommand(): void {
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
id
:
EditorCommands
.
MoveActiveEditor
,
weight
:
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(),
when
:
EditorContextKeys
.
T
extFocus
,
when
:
EditorContextKeys
.
t
extFocus
,
primary
:
null
,
handler
:
(
accessor
,
args
:
any
)
=>
moveActiveEditor
(
args
,
accessor
),
description
:
{
...
...
src/vs/workbench/parts/debug/browser/debugEditorActions.ts
浏览文件 @
8cb7cc0c
...
...
@@ -24,7 +24,7 @@ class ToggleBreakpointAction extends EditorAction {
alias
:
'
Debug: Toggle Breakpoint
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
F9
}
});
...
...
@@ -76,7 +76,7 @@ class ToggleColumnBreakpointAction extends EditorAction {
alias
:
'
Debug: Column Breakpoint
'
,
precondition
:
null
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F9
}
});
...
...
@@ -95,7 +95,7 @@ class ToggleColumnBreakpointContextMenuAction extends EditorAction {
id
:
'
editor.debug.action.toggleColumnBreakpointContextMenu
'
,
label
:
nls
.
localize
(
'
columnBreakpoint
'
,
"
Add Column Breakpoint
"
),
alias
:
'
Toggle Column Breakpoint
'
,
precondition
:
ContextKeyExpr
.
and
(
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
EditorContextKeys
.
W
ritable
),
precondition
:
ContextKeyExpr
.
and
(
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
EditorContextKeys
.
w
ritable
),
menuOpts
:
{
group
:
'
debug
'
,
order
:
1
...
...
@@ -139,7 +139,7 @@ class RunToCursorAction extends EditorAction {
id
:
'
editor.debug.action.runToCursor
'
,
label
:
nls
.
localize
(
'
runToCursor
'
,
"
Run to Cursor
"
),
alias
:
'
Debug: Run to Cursor
'
,
precondition
:
ContextKeyExpr
.
and
(
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
EditorContextKeys
.
W
ritable
,
CONTEXT_DEBUG_STATE
.
isEqualTo
(
'
stopped
'
)),
precondition
:
ContextKeyExpr
.
and
(
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
EditorContextKeys
.
w
ritable
,
CONTEXT_DEBUG_STATE
.
isEqualTo
(
'
stopped
'
)),
menuOpts
:
{
group
:
'
debug
'
,
order
:
2
...
...
@@ -182,7 +182,7 @@ class SelectionToReplAction extends EditorAction {
id
:
'
editor.debug.action.selectionToRepl
'
,
label
:
nls
.
localize
(
'
debugEvaluate
'
,
"
Debug: Evaluate
"
),
alias
:
'
Debug: Evaluate
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
H
asNonEmptySelection
,
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
h
asNonEmptySelection
,
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
),
menuOpts
:
{
group
:
'
debug
'
,
order
:
0
...
...
@@ -209,7 +209,7 @@ class SelectionToWatchExpressionsAction extends EditorAction {
id
:
'
editor.debug.action.selectionToWatch
'
,
label
:
nls
.
localize
(
'
debugAddToWatch
'
,
"
Debug: Add to Watch
"
),
alias
:
'
Debug: Add to Watch
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
H
asNonEmptySelection
,
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
h
asNonEmptySelection
,
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
),
menuOpts
:
{
group
:
'
debug
'
,
order
:
1
...
...
@@ -236,7 +236,7 @@ class ShowDebugHoverAction extends EditorAction {
alias
:
'
Debug: Show Hover
'
,
precondition
:
CONTEXT_IN_DEBUG_MODE
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_I
)
}
});
...
...
@@ -262,7 +262,7 @@ class CloseBreakpointWidgetCommand extends EditorCommand {
precondition
:
CONTEXT_BREAKPOINT_WIDGET_VISIBLE
,
kbOpts
:
{
weight
:
CommonEditorRegistry
.
commandWeight
(
8
),
kbExpr
:
EditorContextKeys
.
F
ocus
,
kbExpr
:
EditorContextKeys
.
f
ocus
,
primary
:
KeyCode
.
Escape
,
secondary
:
[
KeyMod
.
Shift
|
KeyCode
.
Escape
]
}
...
...
src/vs/workbench/parts/debug/electron-browser/repl.ts
浏览文件 @
8cb7cc0c
...
...
@@ -303,7 +303,7 @@ class ReplHistoryPreviousAction extends EditorAction {
alias
:
'
History Previous
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
kbOpts
:
{
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
debug
.
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
),
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
t
extFocus
,
debug
.
CONTEXT_ON_FIRST_DEBUG_REPL_LINE
),
primary
:
KeyCode
.
UpArrow
,
weight
:
50
},
...
...
@@ -328,7 +328,7 @@ class ReplHistoryNextAction extends EditorAction {
alias
:
'
History Next
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
kbOpts
:
{
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
debug
.
CONTEXT_ON_LAST_DEBUG_REPL_LINE
),
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
t
extFocus
,
debug
.
CONTEXT_ON_LAST_DEBUG_REPL_LINE
),
primary
:
KeyCode
.
DownArrow
,
weight
:
50
},
...
...
@@ -353,7 +353,7 @@ class AcceptReplInputAction extends EditorAction {
alias
:
'
REPL Accept Input
'
,
precondition
:
debug
.
CONTEXT_IN_DEBUG_REPL
,
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
Enter
}
});
...
...
@@ -372,7 +372,7 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({
handler
:
x
=>
x
.
acceptSelectedSuggestion
(),
kbOpts
:
{
weight
:
50
,
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyCode
.
RightArrow
}
}));
src/vs/workbench/parts/emmet/node/actions/base64.ts
浏览文件 @
8cb7cc0c
...
...
@@ -30,7 +30,7 @@ class EncodeDecodeDataUrlAction extends EmmetEditorAction {
id
:
'
editor.emmet.action.encodeDecodeDataUrl
'
,
label
:
nls
.
localize
(
'
encodeDecodeDataUrl
'
,
"
Emmet: Encode
\\
Decode data:URL image
"
),
alias
:
'
Emmet: Encode
\\
Decode data:URL image
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
actionName
:
'
encode_decode_data_url
'
});
}
...
...
src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts
浏览文件 @
8cb7cc0c
...
...
@@ -27,10 +27,10 @@ class ExpandAbbreviationAction extends BasicEmmetEditorAction {
{
primary
:
KeyCode
.
Tab
,
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
EditorContextKeys
.
H
asOnlyEmptySelection
,
EditorContextKeys
.
H
asSingleSelection
,
EditorContextKeys
.
T
abDoesNotMoveFocus
,
EditorContextKeys
.
t
extFocus
,
EditorContextKeys
.
h
asOnlyEmptySelection
,
EditorContextKeys
.
h
asSingleSelection
,
EditorContextKeys
.
t
abDoesNotMoveFocus
,
ContextKeyExpr
.
has
(
'
config.emmet.triggerExpansionOnTab
'
)
)
}
...
...
src/vs/workbench/parts/emmet/node/actions/updateTag.ts
浏览文件 @
8cb7cc0c
...
...
@@ -20,7 +20,7 @@ class UpdateTagAction extends EmmetEditorAction {
id
:
'
editor.emmet.action.updateTag
'
,
label
:
nls
.
localize
(
'
updateTag
'
,
"
Emmet: Update Tag
"
),
alias
:
'
Emmet: Update Tag
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
actionName
:
'
update_tag
'
});
}
...
...
src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts
浏览文件 @
8cb7cc0c
...
...
@@ -20,7 +20,7 @@ class WrapWithAbbreviationAction extends EmmetEditorAction {
id
:
'
editor.emmet.action.wrapWithAbbreviation
'
,
label
:
nls
.
localize
(
'
wrapWithAbbreviationAction
'
,
"
Emmet: Wrap with Abbreviation
"
),
alias
:
'
Emmet: Wrap with Abbreviation
'
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
actionName
:
'
wrap_with_abbreviation
'
});
}
...
...
src/vs/workbench/parts/emmet/node/emmetActions.ts
浏览文件 @
8cb7cc0c
...
...
@@ -281,7 +281,7 @@ export class BasicEmmetEditorAction extends EmmetEditorAction {
id
,
label
,
alias
,
precondition
:
EditorContextKeys
.
W
ritable
,
precondition
:
EditorContextKeys
.
w
ritable
,
kbOpts
,
actionName
});
...
...
src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts
浏览文件 @
8cb7cc0c
...
...
@@ -310,9 +310,9 @@ export class DefineKeybindingAction extends EditorAction {
id
:
DefineKeybindingAction
.
ID
,
label
:
nls
.
localize
(
'
DefineKeybindingAction
'
,
"
Define Keybinding
"
),
alias
:
'
Define Keybinding
'
,
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
Writable
,
EditorContextKeys
.
L
anguageId
.
isEqualTo
(
'
json
'
)),
precondition
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
writable
,
EditorContextKeys
.
l
anguageId
.
isEqualTo
(
'
json
'
)),
kbOpts
:
{
kbExpr
:
EditorContextKeys
.
T
extFocus
,
kbExpr
:
EditorContextKeys
.
t
extFocus
,
primary
:
KeyChord
(
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
,
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_K
)
}
});
...
...
src/vs/workbench/parts/snippets/electron-browser/insertSnippet.ts
浏览文件 @
8cb7cc0c
...
...
@@ -59,7 +59,7 @@ class InsertSnippetAction extends EditorAction {
id
:
'
editor.action.insertSnippet
'
,
label
:
nls
.
localize
(
'
snippet.suggestions.label
'
,
"
Insert Snippet
"
),
alias
:
'
Insert Snippet
'
,
precondition
:
EditorContextKeys
.
W
ritable
precondition
:
EditorContextKeys
.
w
ritable
});
}
...
...
src/vs/workbench/parts/snippets/electron-browser/tabCompletion.ts
浏览文件 @
8cb7cc0c
...
...
@@ -96,8 +96,8 @@ CommonEditorRegistry.registerEditorCommand(new TabCompletionCommand({
kbOpts
:
{
weight
:
KeybindingsRegistry
.
WEIGHT
.
editorContrib
(),
kbExpr
:
ContextKeyExpr
.
and
(
EditorContextKeys
.
T
extFocus
,
EditorContextKeys
.
T
abDoesNotMoveFocus
,
EditorContextKeys
.
t
extFocus
,
EditorContextKeys
.
t
abDoesNotMoveFocus
,
CONTEXT_SNIPPET_MODE
.
toNegated
(),
ContextKeyExpr
.
has
(
'
config.editor.tabCompletion
'
)
),
...
...
src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.ts
浏览文件 @
8cb7cc0c
...
...
@@ -40,13 +40,13 @@ Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench)
.
registerWorkbenchContribution
(
WalkThroughSnippetContentProvider
);
Registry
.
as
<
IWorkbenchActionRegistry
>
(
Extensions
.
WorkbenchActions
)
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughArrowUpAction
,
WalkThroughArrowUpAction
.
ID
,
WalkThroughArrowUpAction
.
LABEL
,
{
primary
:
KeyCode
.
UpArrow
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
T
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Up (Line)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughArrowUpAction
,
WalkThroughArrowUpAction
.
ID
,
WalkThroughArrowUpAction
.
LABEL
,
{
primary
:
KeyCode
.
UpArrow
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
t
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Up (Line)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
Registry
.
as
<
IWorkbenchActionRegistry
>
(
Extensions
.
WorkbenchActions
)
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughArrowDownAction
,
WalkThroughArrowDownAction
.
ID
,
WalkThroughArrowDownAction
.
LABEL
,
{
primary
:
KeyCode
.
DownArrow
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
T
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Down (Line)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughArrowDownAction
,
WalkThroughArrowDownAction
.
ID
,
WalkThroughArrowDownAction
.
LABEL
,
{
primary
:
KeyCode
.
DownArrow
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
t
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Down (Line)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
Registry
.
as
<
IWorkbenchActionRegistry
>
(
Extensions
.
WorkbenchActions
)
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughPageUpAction
,
WalkThroughPageUpAction
.
ID
,
WalkThroughPageUpAction
.
LABEL
,
{
primary
:
KeyCode
.
PageUp
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
T
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Up (Page)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughPageUpAction
,
WalkThroughPageUpAction
.
ID
,
WalkThroughPageUpAction
.
LABEL
,
{
primary
:
KeyCode
.
PageUp
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
t
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Up (Page)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
Registry
.
as
<
IWorkbenchActionRegistry
>
(
Extensions
.
WorkbenchActions
)
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughPageDownAction
,
WalkThroughPageDownAction
.
ID
,
WalkThroughPageDownAction
.
LABEL
,
{
primary
:
KeyCode
.
PageDown
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
T
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Down (Page)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
WalkThroughPageDownAction
,
WalkThroughPageDownAction
.
ID
,
WalkThroughPageDownAction
.
LABEL
,
{
primary
:
KeyCode
.
PageDown
},
ContextKeyExpr
.
and
(
WALK_THROUGH_FOCUS
,
EditorContextKeys
.
t
extFocus
.
toNegated
())),
'
Interactive Playground: Scroll Down (Page)
'
,
localize
(
'
interactivePlayground
'
,
"
Interactive Playground
"
));
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录