VSCode shortcuts configuration file

341 阅读1分钟
// Place your key bindings in this file to overwrite the defaults
[
    {
        "key": "ctrl+d",
        "command": "editor.action.goToDeclaration",
        "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
    },
    {
        "key": "f12",
        "command": "-editor.action.goToDeclaration",
        "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
    },
    {
        "key": "ctrl+e",
        "command": "editor.action.openDeclarationToTheSide",
        "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
    },
    {
        "key": "ctrl+k f12",
        "command": "-editor.action.openDeclarationToTheSide",
        "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
    },
    {
        "key": "ctrl+o",
        "command": "lastCursorLineSelect"
    },
    {
        "key": "ctrl+pagedown",
        "command": "workbench.action.terminal.focusNext",
        "when": "!editorTextFocus"
    },
    {
        "key": "ctrl+pageup",
        "command": "workbench.action.terminal.focusPrevious",
        "when": "!editorTextFocus"
    },
    {
        "key": "ctrl+down",
        "command": "workbench.action.terminal.focus"
    },
    {
        "key": "ctrl+left",
        "command": "cursorWordLeft"
    },
    {
        "key": "ctrl+right",
        "command": "cursorWordRight"
    },
    {
        "key": "ctrl+]",
        "command": "-editor.action.indentLines",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+,",
        "command": "workbench.action.terminal.focusFindWidget",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+f",
        "command": "-workbench.action.terminal.focusFindWidget",
        "when": "terminalFocus"
    },
    {
        "key": "ctrl+[",
        "command": "-editor.action.outdentLines",
        "when": "editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+,",
        "command": "-workbench.action.openGlobalSettings"
    },
    {
        "key": "ctrl+.",
        "command": "-editor.action.quickFix",
        "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly"
    },
    {
        "key": "ctrl+shift+t",
        "command": "workbench.action.terminal.new"
    },
    {
        "key": "ctrl+shift+`",
        "command": "-workbench.action.terminal.new"
    },
    {
        "key": "ctrl+shift+t",
        "command": "-workbench.action.reopenClosedEditor"
    },
    {
        "key": "tab",
        "command": "-jumpToNextSnippetPlaceholder",
        "when": "editorTextFocus && hasNextTabstop && inSnippetMode"
    },
    {
        "key": "tab",
        "command": "-editor.emmet.action.expandAbbreviation",
        "when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !editorReadonly && !editorTabMovesFocus"
    },
    {
        "key": "tab",
        "command": "-acceptSelectedSuggestion",
        "when": "editorTextFocus && suggestWidgetVisible"
    },
    {
        "key": "tab",
        "command": "-insertSnippet",
        "when": "editorTextFocus && hasSnippetCompletions && !editorTabMovesFocus && !inSnippetMode"
    },
    {
        "key": "ctrl+alt+-",
        "command": "-workbench.action.navigateBack"
    },
    {
        "key": "ctrl+shift+-",
        "command": "-workbench.action.navigateForward"
    },
    {
        "key": "ctrl+i",
        "command": "workbench.action.navigateForward"
    },
    {
        "key": "shift+alt+-",
        "command": "-workbench.action.navigateForward"
    },
    {
        "key": "ctrl+o",
        "command": "workbench.action.navigateBack"
    },
    {
        "key": "alt+-",
        "command": "-workbench.action.navigateBack"
    }
]