mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Use undefined instead of null | undefined for commands
This commit is contained in:
@@ -301,13 +301,13 @@ export namespace CoreNavigationCommands {
|
||||
export const MoveTo: CoreEditorCommand = registerEditorCommand(new BaseMoveToCommand({
|
||||
id: '_moveTo',
|
||||
inSelectionMode: false,
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
export const MoveToSelect: CoreEditorCommand = registerEditorCommand(new BaseMoveToCommand({
|
||||
id: '_moveToSelect',
|
||||
inSelectionMode: true,
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
abstract class ColumnSelectCommand extends CoreEditorCommand {
|
||||
@@ -330,7 +330,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'columnSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'cursorColumnSelectLeft',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -373,7 +373,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'cursorColumnSelectRight',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -405,7 +405,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorColumnSelectUp: CoreEditorCommand = registerEditorCommand(new ColumnSelectUpCommand({
|
||||
isPaged: false,
|
||||
id: 'cursorColumnSelectUp',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -417,7 +417,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorColumnSelectPageUp: CoreEditorCommand = registerEditorCommand(new ColumnSelectUpCommand({
|
||||
isPaged: true,
|
||||
id: 'cursorColumnSelectPageUp',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -443,7 +443,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorColumnSelectDown: CoreEditorCommand = registerEditorCommand(new ColumnSelectDownCommand({
|
||||
isPaged: false,
|
||||
id: 'cursorColumnSelectDown',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -455,7 +455,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorColumnSelectPageDown: CoreEditorCommand = registerEditorCommand(new ColumnSelectDownCommand({
|
||||
isPaged: true,
|
||||
id: 'cursorColumnSelectPageDown',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -468,7 +468,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'cursorMove',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
description: CursorMove_.description
|
||||
});
|
||||
}
|
||||
@@ -531,7 +531,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorLeft',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -548,7 +548,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorLeftSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -564,7 +564,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorRight',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -581,7 +581,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorRightSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -597,7 +597,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorUp',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -614,7 +614,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorUpSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -633,7 +633,7 @@ export namespace CoreNavigationCommands {
|
||||
value: Constants.PAGE_SIZE_MARKER
|
||||
},
|
||||
id: 'cursorPageUp',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -649,7 +649,7 @@ export namespace CoreNavigationCommands {
|
||||
value: Constants.PAGE_SIZE_MARKER
|
||||
},
|
||||
id: 'cursorPageUpSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -665,7 +665,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorDown',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -682,7 +682,7 @@ export namespace CoreNavigationCommands {
|
||||
value: 1
|
||||
},
|
||||
id: 'cursorDownSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -701,7 +701,7 @@ export namespace CoreNavigationCommands {
|
||||
value: Constants.PAGE_SIZE_MARKER
|
||||
},
|
||||
id: 'cursorPageDown',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -717,7 +717,7 @@ export namespace CoreNavigationCommands {
|
||||
value: Constants.PAGE_SIZE_MARKER
|
||||
},
|
||||
id: 'cursorPageDownSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -729,7 +729,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'createCursor',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -790,7 +790,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: '_lastCursorMoveToSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -835,7 +835,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorHome: CoreEditorCommand = registerEditorCommand(new HomeCommand({
|
||||
inSelectionMode: false,
|
||||
id: 'cursorHome',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -847,7 +847,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorHomeSelect: CoreEditorCommand = registerEditorCommand(new HomeCommand({
|
||||
inSelectionMode: true,
|
||||
id: 'cursorHomeSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -860,7 +860,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'cursorLineStart',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -914,7 +914,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorEnd: CoreEditorCommand = registerEditorCommand(new EndCommand({
|
||||
inSelectionMode: false,
|
||||
id: 'cursorEnd',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -926,7 +926,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorEndSelect: CoreEditorCommand = registerEditorCommand(new EndCommand({
|
||||
inSelectionMode: true,
|
||||
id: 'cursorEndSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -939,7 +939,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'cursorLineEnd',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -994,7 +994,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorTop: CoreEditorCommand = registerEditorCommand(new TopCommand({
|
||||
inSelectionMode: false,
|
||||
id: 'cursorTop',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1006,7 +1006,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorTopSelect: CoreEditorCommand = registerEditorCommand(new TopCommand({
|
||||
inSelectionMode: true,
|
||||
id: 'cursorTopSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1038,7 +1038,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorBottom: CoreEditorCommand = registerEditorCommand(new BottomCommand({
|
||||
inSelectionMode: false,
|
||||
id: 'cursorBottom',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1050,7 +1050,7 @@ export namespace CoreNavigationCommands {
|
||||
export const CursorBottomSelect: CoreEditorCommand = registerEditorCommand(new BottomCommand({
|
||||
inSelectionMode: true,
|
||||
id: 'cursorBottomSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1063,7 +1063,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'editorScroll',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
description: EditorScroll_.description
|
||||
});
|
||||
}
|
||||
@@ -1134,7 +1134,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'scrollLineUp',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1159,7 +1159,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'scrollPageUp',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1185,7 +1185,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'scrollLineDown',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1210,7 +1210,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'scrollPageDown',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1257,20 +1257,20 @@ export namespace CoreNavigationCommands {
|
||||
export const WordSelect: CoreEditorCommand = registerEditorCommand(new WordCommand({
|
||||
inSelectionMode: false,
|
||||
id: '_wordSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
export const WordSelectDrag: CoreEditorCommand = registerEditorCommand(new WordCommand({
|
||||
inSelectionMode: true,
|
||||
id: '_wordSelectDrag',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
export const LastCursorWordSelect: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'lastCursorWordSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1317,13 +1317,13 @@ export namespace CoreNavigationCommands {
|
||||
export const LineSelect: CoreEditorCommand = registerEditorCommand(new LineCommand({
|
||||
inSelectionMode: false,
|
||||
id: '_lineSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
export const LineSelectDrag: CoreEditorCommand = registerEditorCommand(new LineCommand({
|
||||
inSelectionMode: true,
|
||||
id: '_lineSelectDrag',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
class LastCursorLineCommand extends CoreEditorCommand {
|
||||
@@ -1353,20 +1353,20 @@ export namespace CoreNavigationCommands {
|
||||
export const LastCursorLineSelect: CoreEditorCommand = registerEditorCommand(new LastCursorLineCommand({
|
||||
inSelectionMode: false,
|
||||
id: 'lastCursorLineSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
export const LastCursorLineSelectDrag: CoreEditorCommand = registerEditorCommand(new LastCursorLineCommand({
|
||||
inSelectionMode: true,
|
||||
id: 'lastCursorLineSelectDrag',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
}));
|
||||
|
||||
export const ExpandLineSelection: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'expandLineSelection',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
weight: CORE_WEIGHT,
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
@@ -1445,7 +1445,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'revealLine',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
description: RevealLine_.description
|
||||
});
|
||||
}
|
||||
@@ -1493,7 +1493,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'selectAll',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1513,7 +1513,7 @@ export namespace CoreNavigationCommands {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'setSelection',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1728,7 +1728,7 @@ class EditorHandlerCommand extends Command {
|
||||
constructor(id: string, handlerId: string, description?: ICommandHandlerDescription) {
|
||||
super({
|
||||
id: id,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
description: description
|
||||
});
|
||||
this._handlerId = handlerId;
|
||||
|
||||
@@ -40,17 +40,17 @@ export interface ICommandMenubarOptions {
|
||||
}
|
||||
export interface ICommandOptions {
|
||||
id: string;
|
||||
precondition: ContextKeyExpr | null;
|
||||
kbOpts?: ICommandKeybindingsOptions | null;
|
||||
precondition: ContextKeyExpr | undefined;
|
||||
kbOpts?: ICommandKeybindingsOptions;
|
||||
description?: ICommandHandlerDescription;
|
||||
menubarOpts?: ICommandMenubarOptions;
|
||||
}
|
||||
export abstract class Command {
|
||||
public readonly id: string;
|
||||
public readonly precondition: ContextKeyExpr | null;
|
||||
private readonly _kbOpts: ICommandKeybindingsOptions | null | undefined;
|
||||
private readonly _menubarOpts: ICommandMenubarOptions | null | undefined;
|
||||
private readonly _description: ICommandHandlerDescription | null | undefined;
|
||||
public readonly precondition: ContextKeyExpr | undefined;
|
||||
private readonly _kbOpts: ICommandKeybindingsOptions | undefined;
|
||||
private readonly _menubarOpts: ICommandMenubarOptions | undefined;
|
||||
private readonly _description: ICommandHandlerDescription | undefined;
|
||||
|
||||
constructor(opts: ICommandOptions) {
|
||||
this.id = opts.id;
|
||||
|
||||
@@ -31,7 +31,7 @@ class JumpToBracketAction extends EditorAction {
|
||||
id: 'editor.action.jumpToBracket',
|
||||
label: nls.localize('smartSelect.jumpBracket', "Go to Bracket"),
|
||||
alias: 'Go to Bracket',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKSLASH,
|
||||
@@ -55,7 +55,7 @@ class SelectToBracketAction extends EditorAction {
|
||||
id: 'editor.action.selectToBracket',
|
||||
label: nls.localize('smartSelect.selectToBracket', "Select to Bracket"),
|
||||
alias: 'Select to Bracket',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ abstract class ExecCommandAction extends EditorAction {
|
||||
class ExecCommandCutAction extends ExecCommandAction {
|
||||
|
||||
constructor() {
|
||||
let kbOpts: ICommandKeybindingsOptions | null = {
|
||||
let kbOpts: ICommandKeybindingsOptions | undefined = {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_X,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_X, secondary: [KeyMod.Shift | KeyCode.Delete] },
|
||||
@@ -68,7 +68,7 @@ class ExecCommandCutAction extends ExecCommandAction {
|
||||
// Do not bind cut keybindings in the browser,
|
||||
// since browsers do that for us and it avoids security prompts
|
||||
if (!platform.isNative) {
|
||||
kbOpts = null;
|
||||
kbOpts = undefined;
|
||||
}
|
||||
super('cut', {
|
||||
id: 'editor.action.clipboardCutAction',
|
||||
@@ -107,7 +107,7 @@ class ExecCommandCutAction extends ExecCommandAction {
|
||||
class ExecCommandCopyAction extends ExecCommandAction {
|
||||
|
||||
constructor() {
|
||||
let kbOpts: ICommandKeybindingsOptions | null = {
|
||||
let kbOpts: ICommandKeybindingsOptions | undefined = {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, secondary: [KeyMod.CtrlCmd | KeyCode.Insert] },
|
||||
@@ -116,14 +116,14 @@ class ExecCommandCopyAction extends ExecCommandAction {
|
||||
// Do not bind copy keybindings in the browser,
|
||||
// since browsers do that for us and it avoids security prompts
|
||||
if (!platform.isNative) {
|
||||
kbOpts = null;
|
||||
kbOpts = undefined;
|
||||
}
|
||||
|
||||
super('copy', {
|
||||
id: 'editor.action.clipboardCopyAction',
|
||||
label: nls.localize('actions.clipboard.copyLabel', "Copy"),
|
||||
alias: 'Copy',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: kbOpts,
|
||||
menuOpts: {
|
||||
group: CLIPBOARD_CONTEXT_MENU_GROUP,
|
||||
@@ -162,7 +162,7 @@ class ExecCommandCopyAction extends ExecCommandAction {
|
||||
class ExecCommandPasteAction extends ExecCommandAction {
|
||||
|
||||
constructor() {
|
||||
let kbOpts: ICommandKeybindingsOptions | null = {
|
||||
let kbOpts: ICommandKeybindingsOptions | undefined = {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_V,
|
||||
win: { primary: KeyMod.CtrlCmd | KeyCode.KEY_V, secondary: [KeyMod.Shift | KeyCode.Insert] },
|
||||
@@ -171,7 +171,7 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
||||
// Do not bind paste keybindings in the browser,
|
||||
// since browsers do that for us and it avoids security prompts
|
||||
if (!platform.isNative) {
|
||||
kbOpts = null;
|
||||
kbOpts = undefined;
|
||||
}
|
||||
|
||||
super('paste', {
|
||||
@@ -201,7 +201,7 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends ExecCommandAction {
|
||||
id: 'editor.action.clipboardCopyWithSyntaxHighlightingAction',
|
||||
label: nls.localize('actions.clipboard.copyWithSyntaxHighlightingLabel', "Copy With Syntax Highlighting"),
|
||||
alias: 'Copy With Syntax Highlighting',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
|
||||
@@ -228,7 +228,7 @@ class ShowContextMenu extends EditorAction {
|
||||
id: 'editor.action.showContextMenu',
|
||||
label: nls.localize('action.showContextMenu.label', "Show Editor Context Menu"),
|
||||
alias: 'Show Editor Context Menu',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.Shift | KeyCode.F10,
|
||||
|
||||
@@ -119,7 +119,7 @@ export class CursorUndo extends EditorAction {
|
||||
id: 'cursorUndo',
|
||||
label: nls.localize('cursor.undo', "Soft Undo"),
|
||||
alias: 'Soft Undo',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_U,
|
||||
|
||||
@@ -422,7 +422,7 @@ export class StartFindAction extends EditorAction {
|
||||
id: FIND_IDS.StartFindAction,
|
||||
label: nls.localize('startFindAction', "Find"),
|
||||
alias: 'Find',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
@@ -459,7 +459,7 @@ export class StartFindWithSelectionAction extends EditorAction {
|
||||
id: FIND_IDS.StartFindWithSelection,
|
||||
label: nls.localize('startFindWithSelectionAction', "Find With Selection"),
|
||||
alias: 'Find With Selection',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: 0,
|
||||
@@ -513,7 +513,7 @@ export class NextMatchFindAction extends MatchFindAction {
|
||||
id: FIND_IDS.NextMatchFindAction,
|
||||
label: nls.localize('findNextMatchAction', "Find Next"),
|
||||
alias: 'Find Next',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyCode.F3,
|
||||
@@ -535,7 +535,7 @@ export class PreviousMatchFindAction extends MatchFindAction {
|
||||
id: FIND_IDS.PreviousMatchFindAction,
|
||||
label: nls.localize('findPreviousMatchAction', "Find Previous"),
|
||||
alias: 'Find Previous',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.Shift | KeyCode.F3,
|
||||
@@ -583,7 +583,7 @@ export class NextSelectionMatchFindAction extends SelectionMatchFindAction {
|
||||
id: FIND_IDS.NextSelectionMatchFindAction,
|
||||
label: nls.localize('nextSelectionMatchFindAction', "Find Next Selection"),
|
||||
alias: 'Find Next Selection',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.F3,
|
||||
@@ -604,7 +604,7 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction {
|
||||
id: FIND_IDS.PreviousSelectionMatchFindAction,
|
||||
label: nls.localize('previousSelectionMatchFindAction', "Find Previous Selection"),
|
||||
alias: 'Find Previous Selection',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F3,
|
||||
@@ -625,7 +625,7 @@ export class StartFindReplaceAction extends EditorAction {
|
||||
id: FIND_IDS.StartFindReplaceAction,
|
||||
label: nls.localize('startReplace', "Replace"),
|
||||
alias: 'Replace',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_H,
|
||||
@@ -704,7 +704,7 @@ registerEditorCommand(new FindCommand({
|
||||
|
||||
registerEditorCommand(new FindCommand({
|
||||
id: FIND_IDS.ToggleCaseSensitiveCommand,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
handler: x => x.toggleCaseSensitive(),
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorContrib + 5,
|
||||
@@ -718,7 +718,7 @@ registerEditorCommand(new FindCommand({
|
||||
|
||||
registerEditorCommand(new FindCommand({
|
||||
id: FIND_IDS.ToggleWholeWordCommand,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
handler: x => x.toggleWholeWords(),
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorContrib + 5,
|
||||
@@ -732,7 +732,7 @@ registerEditorCommand(new FindCommand({
|
||||
|
||||
registerEditorCommand(new FindCommand({
|
||||
id: FIND_IDS.ToggleRegexCommand,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
handler: x => x.toggleRegex(),
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorContrib + 5,
|
||||
@@ -746,7 +746,7 @@ registerEditorCommand(new FindCommand({
|
||||
|
||||
registerEditorCommand(new FindCommand({
|
||||
id: FIND_IDS.ToggleSearchScopeCommand,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
handler: x => x.toggleSearchScope(),
|
||||
kbOpts: {
|
||||
weight: KeybindingWeight.EditorContrib + 5,
|
||||
|
||||
@@ -503,7 +503,7 @@ class UnfoldAction extends FoldingAction<FoldingArguments> {
|
||||
id: 'editor.unfold',
|
||||
label: nls.localize('unfoldAction.label', "Unfold"),
|
||||
alias: 'Unfold',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_CLOSE_SQUARE_BRACKET,
|
||||
@@ -567,7 +567,7 @@ class UnFoldRecursivelyAction extends FoldingAction<void> {
|
||||
id: 'editor.unfoldRecursively',
|
||||
label: nls.localize('unFoldRecursivelyAction.label', "Unfold Recursively"),
|
||||
alias: 'Unfold Recursively',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET),
|
||||
@@ -588,7 +588,7 @@ class FoldAction extends FoldingAction<FoldingArguments> {
|
||||
id: 'editor.fold',
|
||||
label: nls.localize('foldAction.label', "Fold"),
|
||||
alias: 'Fold',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_OPEN_SQUARE_BRACKET,
|
||||
@@ -652,7 +652,7 @@ class FoldRecursivelyAction extends FoldingAction<void> {
|
||||
id: 'editor.foldRecursively',
|
||||
label: nls.localize('foldRecursivelyAction.label', "Fold Recursively"),
|
||||
alias: 'Fold Recursively',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET),
|
||||
@@ -674,7 +674,7 @@ class FoldAllBlockCommentsAction extends FoldingAction<void> {
|
||||
id: 'editor.foldAllBlockComments',
|
||||
label: nls.localize('foldAllBlockComments.label', "Fold All Block Comments"),
|
||||
alias: 'Fold All Block Comments',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.US_SLASH),
|
||||
@@ -707,7 +707,7 @@ class FoldAllRegionsAction extends FoldingAction<void> {
|
||||
id: 'editor.foldAllMarkerRegions',
|
||||
label: nls.localize('foldAllMarkerRegions.label', "Fold All Regions"),
|
||||
alias: 'Fold All Regions',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_8),
|
||||
@@ -740,7 +740,7 @@ class UnfoldAllRegionsAction extends FoldingAction<void> {
|
||||
id: 'editor.unfoldAllMarkerRegions',
|
||||
label: nls.localize('unfoldAllMarkerRegions.label', "Unfold All Regions"),
|
||||
alias: 'Unfold All Regions',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_9),
|
||||
@@ -773,7 +773,7 @@ class FoldAllAction extends FoldingAction<void> {
|
||||
id: 'editor.foldAll',
|
||||
label: nls.localize('foldAllAction.label', "Fold All"),
|
||||
alias: 'Fold All',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_0),
|
||||
@@ -794,7 +794,7 @@ class UnfoldAllAction extends FoldingAction<void> {
|
||||
id: 'editor.unfoldAll',
|
||||
label: nls.localize('unfoldAllAction.label', "Unfold All"),
|
||||
alias: 'Unfold All',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_J),
|
||||
@@ -838,7 +838,7 @@ for (let i = 1; i <= 7; i++) {
|
||||
id: FoldLevelAction.ID(i),
|
||||
label: nls.localize('foldLevelAction.label', "Fold Level {0}", i),
|
||||
alias: `Fold Level ${i}`,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | (KeyCode.KEY_0 + i)),
|
||||
|
||||
@@ -15,7 +15,7 @@ class EditorFontZoomIn extends EditorAction {
|
||||
id: 'editor.action.fontZoomIn',
|
||||
label: nls.localize('EditorFontZoomIn.label', "Editor Font Zoom In"),
|
||||
alias: 'Editor Font Zoom In',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class EditorFontZoomOut extends EditorAction {
|
||||
id: 'editor.action.fontZoomOut',
|
||||
label: nls.localize('EditorFontZoomOut.label', "Editor Font Zoom Out"),
|
||||
alias: 'Editor Font Zoom Out',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class EditorFontZoomReset extends EditorAction {
|
||||
id: 'editor.action.fontZoomReset',
|
||||
label: nls.localize('EditorFontZoomReset.label', "Editor Font Zoom Reset"),
|
||||
alias: 'Editor Font Zoom Reset',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
|
||||
|
||||
private gotoDefinition(target: IMouseTarget, sideBySide: boolean): Promise<any> {
|
||||
this.editor.setPosition(target.position!);
|
||||
const action = new DefinitionAction(new DefinitionActionConfig(sideBySide, false, true, false), { alias: '', label: '', id: '', precondition: null });
|
||||
const action = new DefinitionAction(new DefinitionActionConfig(sideBySide, false, true, false), { alias: '', label: '', id: '', precondition: undefined });
|
||||
return this.editor.invokeWithinContext(accessor => action.run(accessor, this.editor));
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ class ShowHoverAction extends EditorAction {
|
||||
]
|
||||
}, "Show Hover"),
|
||||
alias: 'Show Hover',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_I),
|
||||
|
||||
@@ -253,7 +253,7 @@ export class IndentUsingTabs extends ChangeIndentationSizeAction {
|
||||
id: IndentUsingTabs.ID,
|
||||
label: nls.localize('indentUsingTabs', "Indent Using Tabs"),
|
||||
alias: 'Indent Using Tabs',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -267,7 +267,7 @@ export class IndentUsingSpaces extends ChangeIndentationSizeAction {
|
||||
id: IndentUsingSpaces.ID,
|
||||
label: nls.localize('indentUsingSpaces', "Indent Using Spaces"),
|
||||
alias: 'Indent Using Spaces',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -281,7 +281,7 @@ export class DetectIndentation extends EditorAction {
|
||||
id: DetectIndentation.ID,
|
||||
label: nls.localize('detectIndentation', "Detect Indentation from Content"),
|
||||
alias: 'Detect Indentation from Content',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -410,7 +410,7 @@ class OpenLinkAction extends EditorAction {
|
||||
id: 'editor.action.openLink',
|
||||
label: nls.localize('label', "Open Link"),
|
||||
alias: 'Open Link',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ export class InsertCursorAbove extends EditorAction {
|
||||
id: 'editor.action.insertCursorAbove',
|
||||
label: nls.localize('mutlicursor.insertAbove', "Add Cursor Above"),
|
||||
alias: 'Add Cursor Above',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.UpArrow,
|
||||
@@ -83,7 +83,7 @@ export class InsertCursorBelow extends EditorAction {
|
||||
id: 'editor.action.insertCursorBelow',
|
||||
label: nls.localize('mutlicursor.insertBelow', "Add Cursor Below"),
|
||||
alias: 'Add Cursor Below',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.DownArrow,
|
||||
@@ -132,7 +132,7 @@ class InsertCursorAtEndOfEachLineSelected extends EditorAction {
|
||||
id: 'editor.action.insertCursorAtEndOfEachLineSelected',
|
||||
label: nls.localize('mutlicursor.insertAtEndOfEachLineSelected', "Add Cursors to Line Ends"),
|
||||
alias: 'Add Cursors to Line Ends',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_I,
|
||||
@@ -184,7 +184,7 @@ class InsertCursorAtEndOfLineSelected extends EditorAction {
|
||||
id: 'editor.action.addCursorsToBottom',
|
||||
label: nls.localize('mutlicursor.addCursorsToBottom', "Add Cursors To Bottom"),
|
||||
alias: 'Add Cursors To Bottom',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ class InsertCursorAtTopOfLineSelected extends EditorAction {
|
||||
id: 'editor.action.addCursorsToTop',
|
||||
label: nls.localize('mutlicursor.addCursorsToTop', "Add Cursors To Top"),
|
||||
alias: 'Add Cursors To Top',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ export class AddSelectionToNextFindMatchAction extends MultiCursorSelectionContr
|
||||
id: 'editor.action.addSelectionToNextFindMatch',
|
||||
label: nls.localize('addSelectionToNextFindMatch', "Add Selection To Next Find Match"),
|
||||
alias: 'Add Selection To Next Find Match',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_D,
|
||||
@@ -675,7 +675,7 @@ export class AddSelectionToPreviousFindMatchAction extends MultiCursorSelectionC
|
||||
id: 'editor.action.addSelectionToPreviousFindMatch',
|
||||
label: nls.localize('addSelectionToPreviousFindMatch', "Add Selection To Previous Find Match"),
|
||||
alias: 'Add Selection To Previous Find Match',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
menubarOpts: {
|
||||
menuId: MenuId.MenubarSelectionMenu,
|
||||
group: '3_multi',
|
||||
@@ -695,7 +695,7 @@ export class MoveSelectionToNextFindMatchAction extends MultiCursorSelectionCont
|
||||
id: 'editor.action.moveSelectionToNextFindMatch',
|
||||
label: nls.localize('moveSelectionToNextFindMatch', "Move Last Selection To Next Find Match"),
|
||||
alias: 'Move Last Selection To Next Find Match',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_D),
|
||||
@@ -714,7 +714,7 @@ export class MoveSelectionToPreviousFindMatchAction extends MultiCursorSelection
|
||||
id: 'editor.action.moveSelectionToPreviousFindMatch',
|
||||
label: nls.localize('moveSelectionToPreviousFindMatch', "Move Last Selection To Previous Find Match"),
|
||||
alias: 'Move Last Selection To Previous Find Match',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
protected _run(multiCursorController: MultiCursorSelectionController, findController: CommonFindController): void {
|
||||
@@ -728,7 +728,7 @@ export class SelectHighlightsAction extends MultiCursorSelectionControllerAction
|
||||
id: 'editor.action.selectHighlights',
|
||||
label: nls.localize('selectAllOccurrencesOfFindMatch', "Select All Occurrences of Find Match"),
|
||||
alias: 'Select All Occurrences of Find Match',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_L,
|
||||
|
||||
@@ -161,7 +161,7 @@ class GrowSelectionAction extends AbstractSmartSelect {
|
||||
id: 'editor.action.smartSelect.expand',
|
||||
label: nls.localize('smartSelect.expand', "Expand Selection"),
|
||||
alias: 'Expand Selection',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.RightArrow,
|
||||
@@ -187,7 +187,7 @@ class ShrinkSelectionAction extends AbstractSmartSelect {
|
||||
id: 'editor.action.smartSelect.shrink',
|
||||
label: nls.localize('smartSelect.shrink', "Shrink Selection"),
|
||||
alias: 'Shrink Selection',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyMod.Shift | KeyMod.Alt | KeyCode.LeftArrow,
|
||||
|
||||
@@ -20,7 +20,7 @@ export class ToggleTabFocusModeAction extends EditorAction {
|
||||
id: ToggleTabFocusModeAction.ID,
|
||||
label: nls.localize({ key: 'toggle.tabMovesFocus', comment: ['Turn on/off use of tab key for moving focus around VS Code'] }, "Toggle Tab Key Moves Focus"),
|
||||
alias: 'Toggle Tab Key Moves Focus',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_M,
|
||||
|
||||
@@ -14,7 +14,7 @@ class ForceRetokenizeAction extends EditorAction {
|
||||
id: 'editor.action.forceRetokenize',
|
||||
label: nls.localize('forceRetokenize', "Developer: Force Retokenize"),
|
||||
alias: 'Developer: Force Retokenize',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ export class CursorWordStartLeft extends WordLeftCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordStartLeft',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
|
||||
@@ -115,7 +115,7 @@ export class CursorWordEndLeft extends WordLeftCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordEndLeft',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ export class CursorWordLeft extends WordLeftCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordStartFast,
|
||||
id: 'cursorWordLeft',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -137,7 +137,7 @@ export class CursorWordStartLeftSelect extends WordLeftCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordStartLeftSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow,
|
||||
@@ -154,7 +154,7 @@ export class CursorWordEndLeftSelect extends WordLeftCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordEndLeftSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ export class CursorWordLeftSelect extends WordLeftCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordLeftSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -176,7 +176,7 @@ export class CursorWordStartRight extends WordRightCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordStartRight',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -187,7 +187,7 @@ export class CursorWordEndRight extends WordRightCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordEndRight',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.RightArrow,
|
||||
@@ -204,7 +204,7 @@ export class CursorWordRight extends WordRightCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordRight',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -215,7 +215,7 @@ export class CursorWordStartRightSelect extends WordRightCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordStartRightSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ export class CursorWordEndRightSelect extends WordRightCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordEndRightSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow,
|
||||
@@ -243,7 +243,7 @@ export class CursorWordRightSelect extends WordRightCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordRightSelect',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class CursorWordPartLeft extends WordPartLeftCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordPartLeft',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
@@ -98,7 +98,7 @@ export class CursorWordPartLeftSelect extends WordPartLeftCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordStart,
|
||||
id: 'cursorWordPartLeftSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
@@ -122,7 +122,7 @@ export class CursorWordPartRight extends WordPartRightCommand {
|
||||
inSelectionMode: false,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordPartRight',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
@@ -138,7 +138,7 @@ export class CursorWordPartRightSelect extends WordPartRightCommand {
|
||||
inSelectionMode: true,
|
||||
wordNavigationType: WordNavigationType.WordEnd,
|
||||
id: 'cursorWordPartRightSelect',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.textInputFocus,
|
||||
primary: 0,
|
||||
|
||||
@@ -330,7 +330,7 @@ class ShowAccessibilityHelpAction extends EditorAction {
|
||||
id: 'editor.action.showAccessibilityHelp',
|
||||
label: AccessibilityHelpNLS.showAccessibilityHelpAction,
|
||||
alias: 'Show Accessibility Help',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: (browser.isIE ? KeyMod.CtrlCmd | KeyCode.F1 : KeyMod.Alt | KeyCode.F1),
|
||||
|
||||
@@ -84,7 +84,7 @@ class InspectTokens extends EditorAction {
|
||||
id: 'editor.action.inspectTokens',
|
||||
label: InspectTokensNLS.inspectTokensAction,
|
||||
alias: 'Developer: Inspect Tokens',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ export class GotoLineAction extends BaseEditorQuickOpenAction {
|
||||
id: 'editor.action.gotoLine',
|
||||
label: GoToLineNLS.gotoLineActionLabel,
|
||||
alias: 'Go to Line...',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_G,
|
||||
|
||||
@@ -82,7 +82,7 @@ export class QuickCommandAction extends BaseEditorQuickOpenAction {
|
||||
id: 'editor.action.quickCommand',
|
||||
label: QuickCommandNLS.quickCommandActionLabel,
|
||||
alias: 'Command Palette',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: (browser.isIE ? KeyMod.Alt | KeyCode.F1 : KeyCode.F1),
|
||||
|
||||
@@ -17,7 +17,7 @@ class ToggleHighContrast extends EditorAction {
|
||||
id: 'editor.action.toggleHighContrast',
|
||||
label: ToggleHighContrastNLS.toggleHighContrast,
|
||||
alias: 'Toggle High Contrast Theme',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
this._originalThemeName = null;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ class ShowAccessibilityHelpAction extends EditorAction {
|
||||
id: 'editor.action.showAccessibilityHelp',
|
||||
label: nls.localize('ShowAccessibilityHelpAction', "Show Accessibility Help"),
|
||||
alias: 'Show Accessibility Help',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.focus,
|
||||
primary: KeyMod.Alt | KeyCode.F1,
|
||||
|
||||
@@ -17,7 +17,7 @@ class InspectKeyMap extends EditorAction {
|
||||
id: 'workbench.action.inspectKeyMappings',
|
||||
label: nls.localize('workbench.action.inspectKeyMap', "Developer: Inspect Key Mappings"),
|
||||
alias: 'Developer: Inspect Key Mappings',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class InspectTMScopes extends EditorAction {
|
||||
id: 'editor.action.inspectTMScopes',
|
||||
label: nls.localize('inspectTMScopes', "Developer: Inspect TM Scopes"),
|
||||
alias: 'Developer: Inspect TM Scopes',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ class ToggleWordWrapAction extends EditorAction {
|
||||
id: TOGGLE_WORD_WRAP_ID,
|
||||
label: nls.localize('toggle.wordwrap', "View: Toggle Word Wrap"),
|
||||
alias: 'View: Toggle Word Wrap',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: null,
|
||||
primary: KeyMod.Alt | KeyCode.KEY_Z,
|
||||
|
||||
@@ -840,7 +840,7 @@ export class NextCommentThreadAction extends EditorAction {
|
||||
id: 'editor.action.nextCommentThreadAction',
|
||||
label: nls.localize('nextCommentThreadAction', "Go to Next Comment Thread"),
|
||||
alias: 'Go to Next Comment Thread',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class ToggleBreakpointAction extends EditorAction {
|
||||
id: TOGGLE_BREAKPOINT_ID,
|
||||
label: nls.localize('toggleBreakpointAction', "Debug: Toggle Breakpoint"),
|
||||
alias: 'Debug: Toggle Breakpoint',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyCode.F9,
|
||||
@@ -63,7 +63,7 @@ class ConditionalBreakpointAction extends EditorAction {
|
||||
id: TOGGLE_CONDITIONAL_BREAKPOINT_ID,
|
||||
label: nls.localize('conditionalBreakpointEditorAction', "Debug: Add Conditional Breakpoint..."),
|
||||
alias: 'Debug: Add Conditional Breakpoint...',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class LogPointAction extends EditorAction {
|
||||
id: TOGGLE_LOG_POINT_ID,
|
||||
label: nls.localize('logPointEditorAction', "Debug: Add Logpoint..."),
|
||||
alias: 'Debug: Add Logpoint...',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ class GoToNextBreakpointAction extends GoToBreakpointAction {
|
||||
id: 'editor.debug.action.goToNextBreakpoint',
|
||||
label: nls.localize('goToNextBreakpoint', "Debug: Go To Next Breakpoint"),
|
||||
alias: 'Debug: Go To Next Breakpoint',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -299,7 +299,7 @@ class GoToPreviousBreakpointAction extends GoToBreakpointAction {
|
||||
id: 'editor.debug.action.goToPreviousBreakpoint',
|
||||
label: nls.localize('goToPreviousBreakpoint', "Debug: Go To Previous Breakpoint"),
|
||||
alias: 'Debug: Go To Previous Breakpoint',
|
||||
precondition: null
|
||||
precondition: undefined
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ class CommandPaletteEditorAction extends EditorAction {
|
||||
id: ShowAllCommandsAction.ID,
|
||||
label: nls.localize('showCommands.label', "Command Palette..."),
|
||||
alias: 'Command Palette',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
menuOpts: {
|
||||
group: 'z_commands',
|
||||
order: 1
|
||||
|
||||
@@ -367,7 +367,7 @@ export class ShowPreviousChangeAction extends EditorAction {
|
||||
id: 'editor.action.dirtydiff.previous',
|
||||
label: nls.localize('show previous change', "Show Previous Change"),
|
||||
alias: 'Show Previous Change',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
|
||||
});
|
||||
}
|
||||
@@ -401,7 +401,7 @@ export class ShowNextChangeAction extends EditorAction {
|
||||
id: 'editor.action.dirtydiff.next',
|
||||
label: nls.localize('show next change', "Show Next Change"),
|
||||
alias: 'Show Next Change',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
|
||||
});
|
||||
}
|
||||
@@ -454,7 +454,7 @@ export class MoveToPreviousChangeAction extends EditorAction {
|
||||
id: 'workbench.action.editor.previousChange',
|
||||
label: nls.localize('move to previous change', "Move to Previous Change"),
|
||||
alias: 'Move to Previous Change',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
|
||||
});
|
||||
}
|
||||
@@ -496,7 +496,7 @@ export class MoveToNextChangeAction extends EditorAction {
|
||||
id: 'workbench.action.editor.nextChange',
|
||||
label: nls.localize('move to next change', "Move to Next Change"),
|
||||
alias: 'Move to Next Change',
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
|
||||
});
|
||||
}
|
||||
|
||||
@@ -502,7 +502,7 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FindPrevious, Fi
|
||||
|
||||
const sendSequenceTerminalCommand = new SendSequenceTerminalCommand({
|
||||
id: SendSequenceTerminalCommand.ID,
|
||||
precondition: null,
|
||||
precondition: undefined,
|
||||
description: {
|
||||
description: `Send Custom Sequence To Terminal`,
|
||||
args: [{
|
||||
|
||||
Reference in New Issue
Block a user