Skip to content

Vscode 快捷键

快捷键作用
Ctrl+F2快速选中多个相同的单词光标
Ctrl+B打开关闭文件目录
Ctrl+Delete删除光标前一个单词
Ctrl+R快速查询页面内的属性和方法
Ctrl+Shit+N新建窗口
Ctrl+K关闭终端
Ctrl+T聚焦于终端
Alt+F+F打开侧边的文件
Alt+F+T在终端打开文件
Alt+Shit+Down/Up多个光标
Ctrl+Shfit+5拆分终端
Ctrl+1/2/3/4/5/6/7垂直拆分编辑面板
Alt+1/2/3/4/5/6/7选中 1-7 面板
Shift+F11免打扰模式
Ctrl+H当前文件替换
Ctrl+Shift+H全局文件替换
Ctrl+Shift+F全局文件搜索
Ctrl+L选中当前行
Ctrl+P (Expand)选中对象体
Ctrl+Enter下方新建一行,即使光标不在行尾
Ctrl+Shift+Enter上方新建一行,即使光标不在行首
Ctrl+D选中单词
Ctrl+Shift+D复制单行或者选中
Ctrl+Shift+[折叠代码
Ctrl+Shift+]展开代码
Ctrl+M光标移动到括号开始或者结尾
Ctrl+Left/Right光标单位性移动
Ctrl+Shift+Left/Right光标单位性选中
Ctrl+K+U/L转换大小写
Ctrl+PageDown/PageUp切换标签页
Ctrl+K+F关闭全部工作区
Ctrl+K+W关闭全部编辑器
Ctrl+Shift+W关闭窗口
Ctrl+W关闭编辑器
Ctrl+Alt+L触发建议
json
// 将键绑定放在此文件中以覆盖默认值
[
  {
    "key": "ctrl+t",
    "command": "workbench.action.terminal.focus"
  },
  {
    "key": "ctrl+capslock",
    "command": "workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup"
  },
  {
    "key": "ctrl+shift+capslock",
    "command": "workbench.action.quickOpenLeastRecentlyUsedEditorInGroup"
  },
  {
    "key": "ctrl+left",
    "command": "workbench.action.terminal.focusPrevious",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "ctrl+down",
    "command": "workbench.action.terminal.focusNextPane",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "alt+down",
    "command": "-workbench.action.terminal.focusNextPane",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "ctrl+up",
    "command": "workbench.action.terminal.focusPreviousPane",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "alt+up",
    "command": "-workbench.action.terminal.focusPreviousPane",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "ctrl+right",
    "command": "workbench.action.terminal.focusNext",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "ctrl+up",
    "command": "-workbench.action.terminal.navigationModeFocusPrevious",
    "when": "accessibilityModeEnabled && terminalA11yTreeFocus && terminalProcessSupported || accessibilityModeEnabled && terminalFocus && terminalProcessSupported"
  },
  {
    "key": "ctrl+down",
    "command": "-workbench.action.terminal.navigationModeFocusNext",
    "when": "accessibilityModeEnabled && terminalA11yTreeFocus && terminalProcessSupported || accessibilityModeEnabled && terminalFocus && terminalProcessSupported"
  },
  {
    "key": "ctrl+k",
    "command": "workbench.action.terminal.kill",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "alt+left",
    "command": "-workbench.action.terminal.focusPreviousPane",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "alt+right",
    "command": "-workbench.action.terminal.focusNextPane",
    "when": "terminalFocus && terminalProcessSupported"
  },
  {
    "key": "alt+f alt+f",
    "command": "workbench.files.action.focusFilesExplorer"
  },
  {
    "key": "alt+f alt+t",
    "command": "openInTerminal"
  },
  {
    "key": "ctrl+alt+l",
    "command": "editor.action.triggerSuggest",
    "when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
  }
]