diff --git a/package.json b/package.json index aff42d7b37c..a92adcee58e 100644 --- a/package.json +++ b/package.json @@ -72,73 +72,74 @@ "when": "editorTextFocus && vim.active && !inDebugRepl" }, { - "key": "cmd+left", - "command": "extension.vim_cmd+left", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" + "key": "Backspace", + "command": "extension.vim_backspace", + "when": "editorTextFocus && vim.active && !inDebugRepl" }, { - "key": "cmd+right", - "command": "extension.vim_cmd+right", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" + "key": "Delete", + "command": "extension.vim_delete", + "when": "editorTextFocus && vim.active && vim.mode != 'Insert' && !inDebugRepl" }, { - "key": "cmd+d", - "command": "extension.vim_cmd+d", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "tab", + "command": "extension.vim_tab", + "when": "editorFocus && vim.active && vim.mode != 'Insert' && !inDebugRepl" }, { - "key": "cmd+a", - "command": "extension.vim_cmd+a", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" + "key": "left", + "command": "extension.vim_left", + "when": "editorTextFocus && vim.active && !inDebugRepl" }, { - "key": "ctrl+d", - "command": "extension.vim_ctrl+d", + "key": "right", + "command": "extension.vim_right", "when": "editorTextFocus && vim.active && !inDebugRepl" }, { - "key": "ctrl+alt+down", - "linux": "shift+alt+down", - "mac": "cmd+alt+down", - "command": "extension.vim_cmd+alt+down", - "when": "editorTextFocus && vim.active && !inDebugRepl" + "key": "up", + "command": "extension.vim_up", + "when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" }, { - "key": "ctrl+alt+up", - "linux": "shift+alt+up", - "mac": "cmd+alt+up", - "command": "extension.vim_cmd+alt+up", - "when": "editorTextFocus && vim.active && !inDebugRepl" + "key": "down", + "command": "extension.vim_down", + "when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" }, { - "key": "Backspace", - "command": "extension.vim_backspace", - "when": "editorTextFocus && vim.active && !inDebugRepl" + "key": "g g", + "command": "list.focusFirst", + "when": "listFocus && !inputFocus" }, { - "key": "shift+backspace", - "command": "extension.vim_shift+backspace", - "when": "editorTextFocus && vim.active && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" + "key": "h", + "command": "list.collapse", + "when": "listFocus && !inputFocus" }, { - "key": "Delete", - "command": "extension.vim_delete", - "when": "editorTextFocus && vim.active && vim.mode != 'Insert' && !inDebugRepl" + "key": "j", + "command": "list.focusDown", + "when": "listFocus && !inputFocus" }, { - "key": "tab", - "command": "extension.vim_tab", - "when": "editorFocus && vim.active && vim.mode != 'Insert' && !inDebugRepl" + "key": "k", + "command": "list.focusUp", + "when": "listFocus && !inputFocus" }, { - "key": "ctrl+r", - "command": "extension.vim_ctrl+r", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "l", + "command": "list.select", + "when": "listFocus && !inputFocus" }, { - "key": "ctrl+f", - "command": "extension.vim_ctrl+f", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "o", + "command": "list.toggleExpand", + "when": "listFocus && !inputFocus" + }, + { + "key": "ctrl+a", + "command": "extension.vim_ctrl+a", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { "key": "ctrl+b", @@ -146,19 +147,19 @@ "when": "editorTextFocus && vim.active && vim.use && vim.mode != 'Insert' && !inDebugRepl" }, { - "key": "ctrl+j", - "command": "extension.vim_ctrl+j", - "when": "editorTextFocus && vim.active && vim.use && vim.mode != 'Insert' && !inDebugRepl" + "key": "ctrl+c", + "command": "extension.vim_ctrl+c", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.overrideCtrlC" }, { - "key": "ctrl+k", - "command": "extension.vim_ctrl+k", - "when": "editorTextFocus && vim.active && vim.use && vim.mode != 'Insert' && !inDebugRepl" + "key": "ctrl+d", + "command": "extension.vim_ctrl+d", + "when": "editorTextFocus && vim.active && !inDebugRepl" }, { - "key": "ctrl+h", - "command": "extension.vim_ctrl+h", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+d", + "command": "list.focusPageDown", + "when": "listFocus && !inputFocus" }, { "key": "ctrl+e", @@ -166,19 +167,14 @@ "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+y", - "command": "extension.vim_ctrl+y", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" - }, - { - "key": "ctrl+u", - "command": "extension.vim_ctrl+u", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+f", + "command": "extension.vim_ctrl+f", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+o", - "command": "extension.vim_ctrl+o", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+h", + "command": "extension.vim_ctrl+h", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { "key": "ctrl+i", @@ -186,95 +182,95 @@ "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+v", - "command": "extension.vim_ctrl+v", - "when": "editorTextFocus && vim.active && vim.use && vim.mode != 'Insert' && !inDebugRepl" + "key": "ctrl+j", + "command": "extension.vim_ctrl+j", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "cmd+v", - "command": "extension.vim_cmd+v", - "when": "editorTextFocus && vim.active && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" + "key": "ctrl+k", + "command": "extension.vim_ctrl+k", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+[", - "command": "extension.vim_ctrl+[", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+l", + "command": "extension.vim_navigateCtrlL", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+]", - "command": "extension.vim_ctrl+]", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+n", + "command": "extension.vim_ctrl+n", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + }, + { + "key": "ctrl+o", + "command": "extension.vim_ctrl+o", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+w h", - "command": "extension.vim_navigateLeft", - "when": "vim.use && vim.active && !editorTextFocus" + "key": "ctrl+p", + "command": "extension.vim_ctrl+p", + "when": "suggestWidgetVisible && vim.active && vim.use" }, { - "key": "ctrl+w l", - "command": "extension.vim_navigateRight", - "when": "vim.use && vim.active && !editorTextFocus" + "key": "ctrl+q", + "command": "extension.vim_winCtrlQ", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+w ctrl+w", - "command": "extension.vim_navigateGroups", - "when": "vim.use && vim.active && !editorTextFocus" + "key": "ctrl+r", + "command": "extension.vim_ctrl+r", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+w j", - "command": "extension.vim_navigateDown", - "when": "vim.use && vim.active && !editorTextFocus" + "key": "ctrl+t", + "command": "extension.vim_ctrl+t", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+w k", - "command": "extension.vim_navigateUp", - "when": "vim.use && vim.active && !editorTextFocus" + "key": "ctrl+u", + "command": "extension.vim_ctrl+u", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+w", - "command": "extension.vim_ctrl+w", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+u", + "command": "list.focusPageUp", + "when": "listFocus && !inputFocus" }, { - "key": "ctrl+c", - "command": "extension.vim_ctrl+c", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.overrideCtrlC" + "key": "ctrl+v", + "command": "extension.vim_ctrl+v", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "cmd+c", - "command": "extension.vim_cmd+c", - "when": "editorTextFocus && vim.active && vim.use && vim.overrideCopy && !inDebugRepl" + "key": "ctrl+w", + "command": "extension.vim_ctrl+w", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+a", - "command": "extension.vim_ctrl+a", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+x", + "command": "extension.vim_ctrl+x", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+n", - "command": "extension.vim_ctrl+n", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+y", + "command": "extension.vim_ctrl+y", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+p", - "command": "extension.vim_ctrl+p", - "when": "suggestWidgetVisible && vim.active && vim.use" + "key": "ctrl+[", + "command": "extension.vim_ctrl+[", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "ctrl+x", - "command": "extension.vim_ctrl+x", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" + "key": "ctrl+]", + "command": "extension.vim_ctrl+]", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { "key": "ctrl+shift+2", "command": "extension.vim_ctrl+shift+2", "when": "editorTextFocus && vim.active && vim.use" }, - { - "key": "ctrl+t", - "command": "extension.vim_ctrl+t", - "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" - }, { "key": "ctrl+pagedown", "command": "extension.vim_ctrl+pagedown", @@ -286,69 +282,58 @@ "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "left", - "command": "extension.vim_left", - "when": "editorTextFocus && vim.active && !inDebugRepl" - }, - { - "key": "right", - "command": "extension.vim_right", - "when": "editorTextFocus && vim.active && !inDebugRepl" - }, - { - "key": "up", - "command": "extension.vim_up", - "when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" - }, - { - "key": "down", - "command": "extension.vim_down", - "when": "editorTextFocus && vim.active && !inDebugRepl && !suggestWidgetVisible && !suggestWidgetMultipleSuggestions" + "key": "shift+G", + "command": "list.focusLast", + "when": "listFocus && !inputFocus" }, { - "key": "j", - "command": "list.focusDown", - "when": "listFocus && !inputFocus" + "key": "shift+backspace", + "command": "extension.vim_shift+backspace", + "when": "editorTextFocus && vim.active && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" }, { - "key": "k", - "command": "list.focusUp", - "when": "listFocus && !inputFocus" + "key": "cmd+left", + "command": "extension.vim_cmd+left", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" }, { - "key": "o", - "command": "list.toggleExpand", - "when": "listFocus && !inputFocus" + "key": "cmd+right", + "command": "extension.vim_cmd+right", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" }, { - "key": "l", - "command": "list.select", - "when": "listFocus && !inputFocus" + "key": "cmd+a", + "command": "extension.vim_cmd+a", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl && vim.mode != 'Insert'" }, { - "key": "h", - "command": "list.collapse", - "when": "listFocus && !inputFocus" + "key": "cmd+c", + "command": "extension.vim_cmd+c", + "when": "editorTextFocus && vim.active && vim.use && vim.overrideCopy && !inDebugRepl" }, { - "key": "g g", - "command": "list.focusFirst", - "when": "listFocus && !inputFocus" + "key": "cmd+d", + "command": "extension.vim_cmd+d", + "when": "editorTextFocus && vim.active && vim.use && !inDebugRepl" }, { - "key": "shift+G", - "command": "list.focusLast", - "when": "listFocus && !inputFocus" + "key": "cmd+v", + "command": "extension.vim_cmd+v", + "when": "editorTextFocus && vim.active && vim.use && vim.mode == 'SearchInProgressMode' && !inDebugRepl" }, { - "key": "ctrl+d", - "command": "list.focusPageDown", - "when": "listFocus && !inputFocus" + "key": "ctrl+alt+down", + "linux": "shift+alt+down", + "mac": "cmd+alt+down", + "command": "extension.vim_cmd+alt+down", + "when": "editorTextFocus && vim.active && !inDebugRepl" }, { - "key": "ctrl+u", - "command": "list.focusPageUp", - "when": "listFocus && !inputFocus" + "key": "ctrl+alt+up", + "linux": "shift+alt+up", + "mac": "cmd+alt+up", + "command": "extension.vim_cmd+alt+up", + "when": "editorTextFocus && vim.active && !inDebugRepl" } ], "configuration": { diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index 1ce922e86d9..32f16a57bbf 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -2649,7 +2649,7 @@ class CommandNavigateLastBOL extends BaseCommand { @RegisterAction class CommandQuit extends BaseCommand { modes = [ModeName.Normal]; - keys = ['', 'q']; + keys = [['', 'q'], ['', ''], ['', 'c'], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { new QuitCommand({}).execute(); @@ -2661,7 +2661,7 @@ class CommandQuit extends BaseCommand { @RegisterAction class CommandOnly extends BaseCommand { modes = [ModeName.Normal]; - keys = [['', 'o'], ['', 'C-o']]; + keys = [['', 'o'], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { new OnlyCommand({}).execute(); @@ -2673,7 +2673,7 @@ class CommandOnly extends BaseCommand { @RegisterAction class MoveToRightPane extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; - keys = [['', 'l'], ['', ''], ['']]; + keys = [['', 'l'], ['', ''], [''], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { vimState.postponedCodeViewChanges.push({ @@ -2688,7 +2688,7 @@ class MoveToRightPane extends BaseCommand { @RegisterAction class MoveToLowerPane extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; - keys = [['', 'j'], ['', ''], ['']]; + keys = [['', 'j'], ['', ''], [''], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { vimState.postponedCodeViewChanges.push({ @@ -2703,7 +2703,7 @@ class MoveToLowerPane extends BaseCommand { @RegisterAction class MoveToUpperPane extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; - keys = [['', 'k'], ['', ''], ['']]; + keys = [['', 'k'], ['', ''], [''], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { vimState.postponedCodeViewChanges.push({ @@ -2718,7 +2718,7 @@ class MoveToUpperPane extends BaseCommand { @RegisterAction class MoveToLeftPane extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; - keys = [['', 'h'], ['', ''], ['']]; + keys = [['', 'h'], ['', ''], [''], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { vimState.postponedCodeViewChanges.push({ @@ -2753,7 +2753,7 @@ class BaseTabCommand extends BaseCommand { @RegisterAction class VerticalSplit extends BaseCommand { modes = [ModeName.Normal, ModeName.Visual, ModeName.VisualLine]; - keys = ['', 'v']; + keys = [['', 'v'], ['', '']]; public async exec(position: Position, vimState: VimState): Promise { vimState.postponedCodeViewChanges.push({