VSCode快捷键设置

1 路径

  • 直接使用Ctrl+K, Ctrl+S打开快捷接设置界面,点击右上角的{},就可以在json中设置,具体自定义快捷键如下:

2 自定义keybings

// Place your key bindings in this file to override the defaultsauto[]
[
  {
    "key": "ctrl+alt+u",
    "command": "editor.action.transformToUppercase",
    "when": "editorTextFocus"
  },
  {
    "key": "ctrl+alt+d",
    "command": "editor.action.transformToLowercase",
    "when": "editorTextFocus"
  },
  {
    "key": "ctrl+shift+o",
    "command": "revealFileInOS",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+shift+s",
    "command": "workbench.action.toggleSidebarVisibility"
  },
  {
    "key": "ctrl+b",
    "command": "-workbench.action.toggleSidebarVisibility"
  },
  {
    "key": "ctrl+w",
    "command": "workbench.action.closeActiveEditor"
  },
  {
    "key": "ctrl+f4",
    "command": "-workbench.action.closeActiveEditor"
  },
  {
    "key": "ctrl+shift+]",
    "command": "workbench.action.quickOpenTerm"
  },
  {
    "key": "ctrl+alt+f",
    "command": "workbench.action.toggleFullScreen"
  },
  {
    "key": "shift+alt+f",
    "command": "references-view.find"
  },
  {
    "key": "ctrl+shift+z",
    "command": "redo"
  },
  {
    "key": "ctrl+y",
    "command": "-redo"
  },
  {
    "key": "ctrl+z",
    "command": "undo"
  },
  {
    "key": "alt+space",
    "command": "-undo"
  },
  {
    "key": "ctrl+u",
    "command": "editor.action.transformToUppercase",
    "when": "editorTextFocus"
  }, 
  {
    "key": "ctrl+b",
    "command": "editor.action.jumpToBracket",
    "when": "editorTextFocus"
  }
  // {
  //     "key": "ctrl+alt+right",
  //     "command": "workbench.action.terminal.focusNext",
  //     "when": "terminalFocus"
  // },
  // {
  //     "key": "ctrl+alt+left",
  //     "command": "workbench.action.terminal.focusPrevious",
  //     "when": "terminalFocus"
  // }
]
posted @ 2024-09-13 10:44  绍荣  阅读(125)  评论(0编辑  收藏  举报