美文网首页
VS code 快捷键

VS code 快捷键

作者: _瑾_ | 来源:发表于2020-05-20 17:02 被阅读0次

    windows VS code :

          // Place your key bindings in this file to overwrite the defaults
    [
        {
            "key": "ctrl+d",
            "command": "editor.action.deleteLines",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+k",
            "command": "-editor.action.deleteLines",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+c",
            "command": "editor.action.commentLine",
            "when": "editorTextFocus && !editorReadonly"
        },
        
        {
            "key": "ctrl+o",
            "command": "workbench.action.gotoSymbol"
        },
        {
            "key": "ctrl+shift+o",
            "command": "-workbench.action.gotoSymbol"
        },
        {
            "key": "shift+enter",
            "command": "cursorLineEnd"
        },
        {
            "key": "ctrl+oem_3",
            "command": "-workbench.action.terminal.toggleTerminal"
        },
        {
            "key": "shift+escape",
            "command": "workbench.action.debug.stop",
            "when": "inDebugMode"
        },
        {
            "key": "shift+f5",
            "command": "-workbench.action.debug.stop",
            "when": "inDebugMode"
        },
        {
            "key": "ctrl+shift+f",
            "command": "-workbench.view.search",
            "when": "!searchViewletVisible"
        },
        {
            "key": "ctrl+shift+f",
            "command": "editor.action.formatDocument",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "shift+alt+f",
            "command": "-editor.action.formatDocument",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+f",
            "command": "-workbench.action.findInFiles",
            "when": "!searchInputBoxFocus"
        },
        {
            "key": "ctrl+shift+enter",
            "command": "editor.action.insertLineAfter",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+enter",
            "command": "-editor.action.insertLineAfter",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+enter",
            "command": "-editor.action.insertLineBefore",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+f1",
            "command": "workbench.action.showCommands"
        },
        {
            "key": "f1",
            "command": "-workbench.action.showCommands"
        },
        {
            "key": "alt+f1",
            "command": "-editor.action.showAccessibilityHelp",
            "when": "editorFocus"
        },
        {
            "key": "ctrl+p",
            "command": "-workbench.action.quickOpenNavigateNextInFilePicker",
            "when": "inFilesPicker && inQuickOpen"
        },
        {
            "key": "alt+e",
            "command": "workbench.action.quickOpen"
        },
        {
            "key": "ctrl+p",
            "command": "-workbench.action.quickOpen"
        },
        {
            "key": "ctrl+k ctrl+i",
            "command": "-editor.action.showHover",
            "when": "editorTextFocus"
        },
        {
            "key": "f1",
            "command": "editor.debug.action.showDebugHover",
            "when": "editorTextFocus && inDebugMode"
        },
        {
            "key": "ctrl+k ctrl+i",
            "command": "-editor.debug.action.showDebugHover",
            "when": "editorTextFocus && inDebugMode"
        },
        {
            "key": "shift+insert",
            "command": "-editor.action.clipboardPasteAction",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "alt+`",
            "command": "workbench.action.togglePanel"
        },
        {
            "key": "ctrl+j",
            "command": "-workbench.action.togglePanel"
        },
        {
            "key": "alt+1",
            "command": "workbench.view.explorer"
        },
        {
            "key": "ctrl+shift+e",
            "command": "-workbench.view.explorer"
        },
        {
            "key": "alt+1",
            "command": "workbench.action.quickOpenNavigatePreviousInFilePicker",
            "when": "inFilesPicker && inQuickOpen"
        },
        {
            "key": "alt+2",
            "command": "workbench.action.toggleSidebarVisibility"
        },
        {
            "key": "ctrl+b",
            "command": "-workbench.action.toggleSidebarVisibility"
        },
        {
            "key": "ctrl+numpad_subtract",
            "command": "editor.fold",
            "when": "editorTextFocus"
        },
        {
            "key": "ctrl+shift+oem_4",
            "command": "-editor.fold",
            "when": "editorTextFocus"
        }
    ]
    

    settings.json

    {
        "editor.minimap.enabled": false,
        "explorer.confirmDelete": false,
        "terminal.integrated.cursorStyle": "line",
        "workbench.editor.enablePreviewFromQuickOpen": false,
        "workbench.startupEditor": "newUntitledFile",
        "http.client": {},
        "window.zoomLevel": 1,
        // "editor.fontFamily": "'等线  Light','Courier New', monospace",
        "editor.fontFamily": "华文新魏",
        "terminal.integrated.fontFamily": "monospace",
        "extensions.ignoreRecommendations": true,
        "html.format.wrapLineLength": 180,
        "html.format.indentInnerHtml": true,
        "explorer.confirmDragAndDrop": false,
        "prettier.trailingComma": "all",
        "javascript.updateImportsOnFileMove.enabled": "always",
        "editor.hover.delay": 800,
        "java.home": "D:/jdk/jdk1.8",
        "[xml]": {},
        "workbench.activityBar.visible": false,
        "vue-format.attr_end_with_gt": false,
        "prettier.tabWidth": 4,
        "vetur.format.defaultFormatter.html": "prettier",
        "typescript.format.enable": false,
        "editor.fontSize": 16,
        "git.autorefresh": false,
        "java.errors.incompleteClasspath.severity": "ignore",
        "breadcrumbs.enabled": false,
        "files.exclude": {
            "**/.classpath": true,
            "**/.project": true,
            "**/.settings": true,
            "**/.factorypath": true
        },
        "python.linting.lintOnSave": false,
        "python.linting.enabled": false,
        "workbench.colorTheme": "Visual Studio Light",
        "python.insidersChannel": "off",
        "git.confirmSync": false,
        "[json]": {
            "editor.defaultFormatter": "vscode.json-language-features"
        },
        "[html]": {
            "editor.defaultFormatter": "vscode.html-language-features"
        },
        "java.semanticHighlighting.enabled": true
    }
    
    

    mac VS code:

    keymap.json

    // Place your key bindings in this file to overwrite the defaults
    [
        {
            "key": "ctrl+d",
            "command": "editor.action.deleteLines",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+k",
            "command": "-editor.action.deleteLines",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+c",
            "command": "editor.action.commentLine",
            "when": "editorTextFocus && !editorReadonly"
        },
        
        {
            "key": "ctrl+o",
            "command": "workbench.action.gotoSymbol"
        },
        {
            "key": "ctrl+shift+o",
            "command": "-workbench.action.gotoSymbol"
        },
        {
            "key": "shift+enter",
            "command": "cursorLineEnd"
        },
        {
            "key": "shift+escape",
            "command": "workbench.action.debug.stop",
            "when": "inDebugMode"
        },
        {
            "key": "shift+f5",
            "command": "-workbench.action.debug.stop",
            "when": "inDebugMode"
        },
        {
            "key": "ctrl+shift+f",
            "command": "-workbench.action.findInFiles",
            "when": "!searchInputBoxFocus"
        },
        {
            "key": "ctrl+shift+enter",
            "command": "editor.action.insertLineAfter",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+enter",
            "command": "-editor.action.insertLineAfter",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+shift+enter",
            "command": "-editor.action.insertLineBefore",
            "when": "editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+f1",
            "command": "workbench.action.showCommands"
        },
        {
            "key": "f1",
            "command": "-workbench.action.showCommands"
        },
        {
            "key": "ctrl+p",
            "command": "-workbench.action.quickOpenNavigateNextInFilePicker",
            "when": "inFilesPicker && inQuickOpen"
        },
        {
            "key": "alt+e",
            "command": "workbench.action.quickOpen"
        },
        {
            "key": "ctrl+p",
            "command": "-workbench.action.quickOpen"
        },
        {
            "key": "ctrl+k ctrl+i",
            "command": "-editor.action.showHover",
            "when": "editorTextFocus"
        },
        {
            "key": "f1",
            "command": "editor.debug.action.showDebugHover",
            "when": "editorTextFocus && inDebugMode"
        },
        {
            "key": "ctrl+k ctrl+i",
            "command": "-editor.debug.action.showDebugHover",
            "when": "editorTextFocus && inDebugMode"
        },
        {
            "key": "shift+insert",
            "command": "-editor.action.clipboardPasteAction",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "alt+`",
            "command": "workbench.action.togglePanel"
        },
        {
            "key": "ctrl+j",
            "command": "-workbench.action.togglePanel"
        },
        {
            "key": "alt+1",
            "command": "workbench.view.explorer"
        },
        {
            "key": "ctrl+shift+e",
            "command": "-workbench.view.explorer"
        },
        {
            "key": "alt+1",
            "command": "workbench.action.quickOpenNavigatePreviousInFilePicker",
            "when": "inFilesPicker && inQuickOpen"
        },
        {
            "key": "alt+2",
            "command": "workbench.action.toggleSidebarVisibility"
        },
        {
            "key": "ctrl+b",
            "command": "-workbench.action.toggleSidebarVisibility"
        },
        {
            "key": "ctrl+numpad_subtract",
            "command": "editor.fold",
            "when": "editorTextFocus"
        },
        {
            "key": "cmd+c",
            "command": "-editor.action.clipboardCopyAction",
            "when": "textInputFocus"
        },
        {
            "key": "ctrl+v",
            "command": "editor.action.clipboardPasteAction",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "cmd+v",
            "command": "-editor.action.clipboardPasteAction",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+v",
            "command": "editor.action.webvieweditor.paste",
            "when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
        },
        {
            "key": "cmd+v",
            "command": "-editor.action.webvieweditor.paste",
            "when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
        },
        {
            "key": "ctrl+v",
            "command": "filesExplorer.paste",
            "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
        },
        {
            "key": "cmd+v",
            "command": "-filesExplorer.paste",
            "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceReadonly && !inputFocus"
        },
        {
            "key": "ctrl+z",
            "command": "undo",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "cmd+z",
            "command": "-undo",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+z",
            "command": "editor.action.webvieweditor.undo",
            "when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
        },
        {
            "key": "cmd+z",
            "command": "-editor.action.webvieweditor.undo",
            "when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
        },
        {
            "key": "ctrl+s",
            "command": "workbench.action.files.save"
        },
        {
            "key": "cmd+s",
            "command": "-workbench.action.files.save"
        },
        {
            "key": "ctrl+x",
            "command": "editor.action.clipboardCutAction",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "cmd+x",
            "command": "-editor.action.clipboardCutAction",
            "when": "textInputFocus && !editorReadonly"
        },
        {
            "key": "ctrl+x",
            "command": "filesExplorer.cut",
            "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
        },
        {
            "key": "cmd+x",
            "command": "-filesExplorer.cut",
            "when": "explorerViewletVisible && filesExplorerFocus && !explorerResourceIsRoot && !inputFocus"
        },
        {
            "key": "ctrl+f",
            "command": "actions.find"
        },
        {
            "key": "cmd+f",
            "command": "-actions.find"
        },
        {
            "key": "ctrl+z",
            "command": "default:undo"
        },
        {
            "key": "ctrl+w",
            "command": "workbench.action.closeAllEditors"
        },
        {
            "key": "cmd+k cmd+w",
            "command": "-workbench.action.closeAllEditors"
        },
        {
            "key": "ctrl+shift+f",
            "command": "editor.action.formatDocument",
            "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
        },
        {
            "key": "shift+alt+f",
            "command": "-editor.action.formatDocument",
            "when": "editorHasDocumentFormattingProvider && editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
        },
        {
            "key": "ctrl+3",
            "command": "-workbench.action.openEditorAtIndex3"
        },
        {
            "key": "ctrl+a",
            "command": "workbench.action.terminal.selectAll",
            "when": "terminalFocus"
        },
        {
            "key": "cmd+a",
            "command": "-workbench.action.terminal.selectAll",
            "when": "terminalFocus"
        },
        {
            "key": "ctrl+a",
            "command": "editor.action.selectAll",
            "when": "textInputFocus"
        },
        {
            "key": "cmd+a",
            "command": "-editor.action.selectAll",
            "when": "textInputFocus"
        },
        {
            "key": "ctrl+a",
            "command": "editor.action.webvieweditor.selectAll",
            "when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
        },
        {
            "key": "cmd+a",
            "command": "-editor.action.webvieweditor.selectAll",
            "when": "!editorFocus && !inputFocus && activeEditor == 'WebviewEditor'"
        },
        {
            "key": "ctrl+a",
            "command": "list.selectAll",
            "when": "listFocus && listSupportsMultiselect && !inputFocus"
        },
        {
            "key": "cmd+a",
            "command": "-list.selectAll",
            "when": "listFocus && listSupportsMultiselect && !inputFocus"
        },
        {
            "key": "ctrl+c",
            "command": "editor.action.clipboardCopyAction",
            "when": "notebookEditorFocused && !inputFocus"
        }
    ]
    

    settings.json

    {
        "editor.minimap.enabled": false,
        "explorer.confirmDelete": false,
        "terminal.integrated.cursorStyle": "line",
        "workbench.editor.enablePreviewFromQuickOpen": false,
        "workbench.startupEditor": "newUntitledFile",
        "http.client": {},
        "window.zoomLevel": 1,
        // "editor.fontFamily": "'等线  Light','Courier New', monospace",
        "editor.fontFamily": "courier",
        "terminal.integrated.fontFamily": "courier",
        "extensions.ignoreRecommendations": true,
        "html.format.wrapLineLength": 0,
        "html.format.indentInnerHtml": true,
        "explorer.confirmDragAndDrop": false,
        "prettier.trailingComma": "all",
        "javascript.updateImportsOnFileMove.enabled": "always",
        "editor.hover.delay": 800,
        "[xml]": {
            "editor.defaultFormatter": "mikeburgh.xml-format"
        },
        "workbench.activityBar.visible": false,
        "vue-format.attr_end_with_gt": false,
        "prettier.tabWidth": 4,
        "vetur.format.defaultFormatter.html": "prettier",
        "typescript.format.enable": false,
        "editor.fontSize": 16,
        "git.autorefresh": false,
        "java.errors.incompleteClasspath.severity": "ignore",
        "breadcrumbs.enabled": false,
        "files.exclude": {
            "**/.classpath": true,
            "**/.project": true,
            "**/.settings": true,
            "**/.factorypath": true
        },
        "python.linting.lintOnSave": false,
        "python.linting.enabled": false,
        "terminal.integrated.fontSize": 14,
        "git.confirmSync": false,
        "gitlens.advanced.messages": {
            "suppressFileNotUnderSourceControlWarning": true
        },
        "git.autofetch": true,
        "workbench.colorTheme": "Visual Studio Light",
        "editor.suggestSelection": "first",
        "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
        "python.jediEnabled": false,
        "gitlens.views.repositories.location": "scm",
        "[html]": {
            "editor.defaultFormatter": "vscode.html-language-features"
        },
        "terminal.integrated.rendererType": "dom",
        "eslint.enable": false,
        "html.format.wrapAttributes": "preserve",
        "vetur.useWorkspaceDependencies": true
    }
    

    相关文章

      网友评论

          本文标题:VS code 快捷键

          本文链接:https://www.haomeiwen.com/subject/gqunohtx.html