Skip to content

Instantly share code, notes, and snippets.

@RyanJeong
Last active November 25, 2021 09:07
Show Gist options
  • Save RyanJeong/ad4292003ba00da10e54950966ff82ff to your computer and use it in GitHub Desktop.
Save RyanJeong/ad4292003ba00da10e54950966ff82ff to your computer and use it in GitHub Desktop.
macOS vscode key binding
[
    {
      "key": "cmd+;",
      "command": "terminal.focus",
      "when": "editorFocus"
    },
    {
      "key": "cmd+;",
      "command": "workbench.action.focusActiveEditorGroup",
      "when": "terminalFocus"
    },
    {
      "key": "cmd+f",
      "command": "actions.find",
      "when": "editorFocus || editorIsOpen"
    },
    {
      "key": "cmd+f",
      "command": "-actions.find",
      "when": "editorFocus || editorIsOpen"
    },
    {
      "key": "cmd+f",
      "command": "extension.vim_ctrl+f",
      "when": "editorTextFocus && vim.active && vim.use<C-f> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+f",
      "command": "-extension.vim_ctrl+f",
      "when": "editorTextFocus && vim.active && vim.use<C-f> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+[",
      "command": "extension.vim_ctrl+[",
      "when": "editorTextFocus && vim.active && vim.use<C-[> && !inDebugRepl"
    },
    {
      "key": "ctrl+[",
      "command": "-extension.vim_ctrl+[",
      "when": "editorTextFocus && vim.active && vim.use<C-[> && !inDebugRepl"
    },
    {
      "key": "cmd+]",
      "command": "extension.vim_ctrl+]",
      "when": "editorTextFocus && vim.active && vim.use<C-]> && !inDebugRepl"
    },
    {
      "key": "ctrl+]",
      "command": "-extension.vim_ctrl+]",
      "when": "editorTextFocus && vim.active && vim.use<C-]> && !inDebugRepl"
    },
    {
      "key": "cmd+6",
      "command": "extension.vim_ctrl+6",
      "when": "editorTextFocus && vim.active && vim.use<C-6> && !inDebugRepl"
    },
    {
      "key": "ctrl+6",
      "command": "-extension.vim_ctrl+6",
      "when": "editorTextFocus && vim.active && vim.use<C-6> && !inDebugRepl"
    },
    {
      "key": "cmd+a",
      "command": "extension.vim_ctrl+a",
      "when": "editorTextFocus && vim.active && vim.use<C-a> && !inDebugRepl"
    },
    {
      "key": "ctrl+a",
      "command": "-extension.vim_ctrl+a",
      "when": "editorTextFocus && vim.active && vim.use<C-a> && !inDebugRepl"
    },
    {
      "key": "cmd+b",
      "command": "extension.vim_ctrl+b",
      "when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+b",
      "command": "-extension.vim_ctrl+b",
      "when": "editorTextFocus && vim.active && vim.use<C-b> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+backspace",
      "command": "extension.vim_ctrl+backspace",
      "when": "editorTextFocus && vim.active && vim.use<C-BS> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+backspace",
      "command": "-extension.vim_ctrl+backspace",
      "when": "editorTextFocus && vim.active && vim.use<C-BS> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+c",
      "command": "extension.vim_ctrl+c",
      "when": "editorTextFocus && vim.active && vim.overrideCtrlC && vim.use<C-c> && !inDebugRepl"
    },
    {
      "key": "ctrl+c",
      "command": "-extension.vim_ctrl+c",
      "when": "editorTextFocus && vim.active && vim.overrideCtrlC && vim.use<C-c> && !inDebugRepl"
    },
    {
      "key": "cmd+d",
      "command": "extension.vim_ctrl+d",
      "when": "editorTextFocus && vim.active && vim.use<C-d> && !inDebugRepl"
    },
    {
      "key": "ctrl+d",
      "command": "-extension.vim_ctrl+d",
      "when": "editorTextFocus && vim.active && vim.use<C-d> && !inDebugRepl"
    },
    {
      "key": "cmd+down",
      "command": "extension.vim_ctrl+down",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+down",
      "command": "-extension.vim_ctrl+down",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+e",
      "command": "extension.vim_ctrl+e",
      "when": "editorTextFocus && vim.active && vim.use<C-e> && !inDebugRepl"
    },
    {
      "key": "ctrl+e",
      "command": "-extension.vim_ctrl+e",
      "when": "editorTextFocus && vim.active && vim.use<C-e> && !inDebugRepl"
    },
    {
      "key": "cmd+end",
      "command": "extension.vim_ctrl+end",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+end",
      "command": "-extension.vim_ctrl+end",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+g",
      "command": "extension.vim_ctrl+g",
      "when": "editorTextFocus && vim.active && vim.use<C-g> && !inDebugRepl"
    },
    {
      "key": "ctrl+g",
      "command": "-extension.vim_ctrl+g",
      "when": "editorTextFocus && vim.active && vim.use<C-g> && !inDebugRepl"
    },
    {
      "key": "cmd+h",
      "command": "extension.vim_ctrl+h",
      "when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
    },
    {
      "key": "ctrl+h",
      "command": "-extension.vim_ctrl+h",
      "when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
    },
    {
      "key": "cmd+home",
      "command": "extension.vim_ctrl+home",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+home",
      "command": "-extension.vim_ctrl+home",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+i",
      "command": "extension.vim_ctrl+i",
      "when": "editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl"
    },
    {
      "key": "ctrl+i",
      "command": "-extension.vim_ctrl+i",
      "when": "editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl"
    },
    {
      "key": "cmd+j",
      "command": "extension.vim_ctrl+j",
      "when": "editorTextFocus && vim.active && vim.use<C-j> && !inDebugRepl"
    },
    {
      "key": "ctrl+j",
      "command": "-extension.vim_ctrl+j",
      "when": "editorTextFocus && vim.active && vim.use<C-j> && !inDebugRepl"
    },
    {
      "key": "cmd+k",
      "command": "extension.vim_ctrl+k",
      "when": "editorTextFocus && vim.active && vim.use<C-k> && !inDebugRepl"
    },
    {
      "key": "ctrl+k",
      "command": "-extension.vim_ctrl+k",
      "when": "editorTextFocus && vim.active && vim.use<C-k> && !inDebugRepl"
    },
    {
      "key": "cmd+left",
      "command": "extension.vim_ctrl+left",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+left",
      "command": "-extension.vim_ctrl+left",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+m",
      "command": "extension.vim_ctrl+m",
      "when": "editorTextFocus && vim.active && vim.use<C-m> && !inDebugRepl || vim.active && vim.use<C-m> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-m> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
    },
    {
      "key": "ctrl+m",
      "command": "-extension.vim_ctrl+m",
      "when": "editorTextFocus && vim.active && vim.use<C-m> && !inDebugRepl || vim.active && vim.use<C-m> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-m> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
    },
    {
      "key": "cmd+n",
      "command": "extension.vim_ctrl+n",
      "when": "editorTextFocus && vim.active && vim.use<C-n> && !inDebugRepl || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
    },
    {
      "key": "ctrl+n",
      "command": "-extension.vim_ctrl+n",
      "when": "editorTextFocus && vim.active && vim.use<C-n> && !inDebugRepl || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-n> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
    },
    {
      "key": "cmd+o",
      "command": "extension.vim_ctrl+o",
      "when": "editorTextFocus && vim.active && vim.use<C-o> && !inDebugRepl"
    },
    {
      "key": "ctrl+o",
      "command": "-extension.vim_ctrl+o",
      "when": "editorTextFocus && vim.active && vim.use<C-o> && !inDebugRepl"
    },
    {
      "key": "cmd+p",
      "command": "extension.vim_ctrl+p",
      "when": "suggestWidgetVisible && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
    },
    {
      "key": "ctrl+p",
      "command": "-extension.vim_ctrl+p",
      "when": "suggestWidgetVisible && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
    },
    {
      "key": "cmd+pagedown",
      "command": "extension.vim_ctrl+pagedown",
      "when": "editorTextFocus && vim.active && vim.use<C-pagedown> && !inDebugRepl"
    },
    {
      "key": "ctrl+pagedown",
      "command": "-extension.vim_ctrl+pagedown",
      "when": "editorTextFocus && vim.active && vim.use<C-pagedown> && !inDebugRepl"
    },
    {
      "key": "cmd+pageup",
      "command": "extension.vim_ctrl+pageup",
      "when": "editorTextFocus && vim.active && vim.use<C-pageup> && !inDebugRepl"
    },
    {
      "key": "ctrl+pageup",
      "command": "-extension.vim_ctrl+pageup",
      "when": "editorTextFocus && vim.active && vim.use<C-pageup> && !inDebugRepl"
    },
    {
      "key": "cmd+r",
      "command": "extension.vim_ctrl+r",
      "when": "editorTextFocus && vim.active && vim.use<C-r> && !inDebugRepl"
    },
    {
      "key": "ctrl+r",
      "command": "-extension.vim_ctrl+r",
      "when": "editorTextFocus && vim.active && vim.use<C-r> && !inDebugRepl"
    },
    {
      "key": "cmd+right",
      "command": "extension.vim_ctrl+right",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+right",
      "command": "-extension.vim_ctrl+right",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "shift+cmd+2",
      "command": "extension.vim_ctrl+shift+2",
      "when": "editorTextFocus && vim.active && vim.use<C-shift+2>"
    },
    {
      "key": "ctrl+shift+2",
      "command": "-extension.vim_ctrl+shift+2",
      "when": "editorTextFocus && vim.active && vim.use<C-shift+2>"
    },
    {
      "key": "cmd",
      "command": "extension.vim_ctrl+space",
      "when": "editorTextFocus && vim.active && vim.use<C-space> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+space",
      "command": "-extension.vim_ctrl+space",
      "when": "editorTextFocus && vim.active && vim.use<C-space> && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+t",
      "command": "extension.vim_ctrl+t",
      "when": "editorTextFocus && vim.active && vim.use<C-t> && !inDebugRepl"
    },
    {
      "key": "ctrl+t",
      "command": "-extension.vim_ctrl+t",
      "when": "editorTextFocus && vim.active && vim.use<C-t> && !inDebugRepl"
    },
    {
      "key": "cmd+u",
      "command": "extension.vim_ctrl+u",
      "when": "editorTextFocus && vim.active && vim.use<C-u> && !inDebugRepl"
    },
    {
      "key": "ctrl+u",
      "command": "-extension.vim_ctrl+u",
      "when": "editorTextFocus && vim.active && vim.use<C-u> && !inDebugRepl"
    },
    {
      "key": "cmd+up",
      "command": "extension.vim_ctrl+up",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "ctrl+up",
      "command": "-extension.vim_ctrl+up",
      "when": "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert'"
    },
    {
      "key": "cmd+v",
      "command": "extension.vim_ctrl+v",
      "when": "editorTextFocus && vim.active && vim.use<C-v> && !inDebugRepl"
    },
    {
      "key": "ctrl+v",
      "command": "-extension.vim_ctrl+v",
      "when": "editorTextFocus && vim.active && vim.use<C-v> && !inDebugRepl"
    },
    {
      "key": "cmd+w",
      "command": "extension.vim_ctrl+w",
      "when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"
    },
    {
      "key": "ctrl+w",
      "command": "-extension.vim_ctrl+w",
      "when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"
    },
    {
      "key": "cmd+x",
      "command": "extension.vim_ctrl+x",
      "when": "editorTextFocus && vim.active && vim.use<C-x> && !inDebugRepl"
    },
    {
      "key": "ctrl+x",
      "command": "-extension.vim_ctrl+x",
      "when": "editorTextFocus && vim.active && vim.use<C-x> && !inDebugRepl"
    },
    {
      "key": "cmd+y",
      "command": "extension.vim_ctrl+y",
      "when": "editorTextFocus && vim.active && vim.use<C-y> && !inDebugRepl"
    },
    {
      "key": "ctrl+y",
      "command": "-extension.vim_ctrl+y",
      "when": "editorTextFocus && vim.active && vim.use<C-y> && !inDebugRepl"
    },
    {
      "key": "cmd+l",
      "command": "extension.vim_navigateCtrlL",
      "when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
    },
    {
      "key": "ctrl+l",
      "command": "-extension.vim_navigateCtrlL",
      "when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
    },
    {
      "key": "cmd+q",
      "command": "extension.vim_winCtrlQ",
      "when": "editorTextFocus && vim.active && vim.use<C-q> && !inDebugRepl"
    },
    {
      "key": "ctrl+q",
      "command": "-extension.vim_winCtrlQ",
      "when": "editorTextFocus && vim.active && vim.use<C-q> && !inDebugRepl"
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment