请注意:本文中的快捷键主要应用于Linux桌面系统,其他系统仅作参考。
全局快捷键
- Ctrl+Shift+P,F1
Show Command Palette : 显示调色板(控制板) - Ctrl+P
Go to file, quick open : 定位到文件或快速打开 - Ctrl+Shift+N
Open a new window/instance : 打开一个新的窗口/实例 - Ctrl+W
Close window , changed to close editor: 关闭窗口,已经被我自定义为关闭编辑器 - Ctrl+,
User settings : 打开用户配置页面 - Ctrl+K Ctrl+S
Keyboard Shortcuts : 键盘快捷键配置 - Ctrl+Shift+w
Close current window : 关闭窗口
基本编辑
- Alt+Up/Down
Move line down/up : 行进行上下 - Ctrl+Shift+K
Delete line : 删掉本行 - Ctrl+Up/Down
Scroll line up/down : 按行上行,下行 - Ctrl+Shift+[/]
Fold/Unfold region : 打开关闭区域 - Ctrl+K Ctrl+[/]
Fold/Unfold all subregions : 打开关闭所有子区域 - Ctrl+Shift+Up/Down
Multiline choose : 多行多光标选取 - Ctrl+Shift+L
Select all occurrences of current selection : 选取本选取多次出现的地方 - Ctrl+F2
Select all occurrences of current word : 选取本词多次出现的地方
显示
- F11
Full Screen : 全屏 - Ctrl+B (Ctrl+Shift+B customized)
Toggle Sidebar visibility : 侧边栏开关 - Ctrl+Shift+E
Show Explorer / Toggle focus : 探索页展示/焦点切换 - Ctrl+Shift+F
Show search : 展示搜索页面 - Ctrl+Shift+G
Show source control : 展示资源控制页面 - Ctrl+Shift+D
Show debug : 展示Debug页面 - Ctrl+Shift+X
Show Extensions : 展示插件安装页面 - Ctrl+Shift+H
Replace in file : 替换页面,与搜索页面同 - Ctrl+Shift+C
Open new command prompt/terminal : 打开新的终端 - Ctrl+K Ctrl+H
Open new output panel : 打开新的输出页面 - Ctrl+K V (Ctrl+K Ctrl+V customized)
Open markdown preview on right panel : 在右边打开新的Markdown预览页面 - Ctrl+K Z
Toggle Zen mode : 禅模式开关
导航
- Ctrl+G
Go to lines : 跳到行 - Ctrl+Shift+M
Show problems panel : 展示问题看板
编辑器操作
- Ctrl+W
Close editor : 关闭编辑器 - Ctrl+K F
Close folder : 关闭文件夹 - Ctrl+\
Split editor : 分割编辑器 - Ctrl+1 / 2 / 3
Focus into 1th,2nd,3rd editor group : 切换编辑器组 - Ctrl+K Ctrl+left/right
Focus into previous/next group : 切换到前后编辑器组 - Ctrl+Shift+PageUp/PageDown
Move current editor left/right : 移动当前编辑器向左向右 - Ctrl+K left/right
Move editor group left/right : 移动当前编辑器组 - Ctrl+K Ctrl+W
Close all editors : 关闭所有编辑器
文件操作
- Ctrl+N
New file : 新建文件 - Ctrl+O
Open file : 打开文件 - Ctrl+K Ctrl+O
Open directory : 打开目录 - Ctrl+S
Save file : 保存文件 - Ctrl+Shift+S
Save As... : 另存为 - Ctrl+K P
Copy path of active file : 拷贝当前文件的目录 - Ctrl+Shift+T
Reopen closed editor : 打开已关闭的编辑器 - Ctrl+Tab
Open next editor : 切换到下一个编辑器 - Ctrl+Shift+Tab
Open previous editor : 切换到上一个编辑器 - Ctrl+K R
Reveal active file in explorer : 在当前文件所在的文件夹 - Ctrl+K O
Show active file in new window/instance : 将当前文件在新的窗口中打开
内嵌的终端
- Ctrl+`
Show intergrated terminal : 开关内置终端 - Ctrl+Shift+`
Create new terminal : 打开一个新的终端 - Ctrl+Shift+V
Paste things in this terminal : 将数据粘贴到当前终端 - Ctrl+Shift+Up/Down
Scroll up/down in this terminal : 在当前终端上/下滚动一行 - Ctrl+Shift+PageUp/PageDown
Scroll page up/down in this terminal : 在当前终端上/下滚动一页
系统快捷键(乱入)
- Shift+Alt(Hold)
Ubuntu System shortcut : 系统快捷键
参考
Visual studio Code keyboard shortcuts for linux