[No0000113]Keyboard shortcuts for Windows Visual Studio Code

时间:2023-03-09 01:50:30
[No0000113]Keyboard shortcuts for Windows Visual Studio Code

General 常用
Ctrl+Shift+P, F1 Show Command Palette 显示命令行
Ctrl+P Quick Open, Go to File… 快速打开
Ctrl+Shift+N New window/instance 新建窗口
Ctrl+Shift+W Close window/instance关闭窗口
Ctrl+, User Settings 用户设置
Ctrl+K Ctrl+S Keyboard Shortcuts 快捷键
Basic editing 基本编辑
Ctrl+X Cut line (empty selection) 剪贴
Ctrl+C Copy line (empty selection) 拷贝
Alt+ ↑ / ↓ Move line up/down 上/下移一行
Shift+Alt + ↓ / ↑ Copy line up/down 上/下复制一行 
Ctrl+Shift+K Delete line 删除行
Ctrl+Enter Insert line below 前插入行
Ctrl+Shift+Enter Insert line above 后插入行
Ctrl+Shift+\ Jump to matching bracket 转到匹配框号
Ctrl+] / [ Indent/outdent line  伸缩线
Home / End Go to beginning/end of line 跳转本行 首/末
Ctrl+Home Go to beginning of file 跳转本文件首
Ctrl+End Go to end of file 跳转本文件末
Ctrl+↑ / ↓ Scroll line up/down 上/下滚动
Alt+PgUp / PgDn Scroll page up/down 上下/滚动页
Ctrl+Shift+[ Fold (collapse) region 折叠区域
Ctrl+Shift+] Unfold (uncollapse) region 展开区域
Ctrl+K Ctrl+[ Fold (collapse) all subregions 折叠子域
Ctrl+K Ctrl+] Unfold (uncollapse) all subregions 展开子域
Ctrl+K Ctrl+0 Fold (collapse) all regions 全部折叠
Ctrl+K Ctrl+J Unfold (uncollapse) all regions 全部展开
Ctrl+K Ctrl+C Add line comment 添加行注释
Ctrl+K Ctrl+U Remove line comment 删除行注释
Ctrl+/ Toggle line comment 触发行注释
Shift+Alt+A Toggle block comment 切换块注释
Alt+Z Toggle word wrap 切换文字换行
Navigation 导航
Ctrl+T Show all Symbols 显示所有符号
Ctrl+G Go to Line... 转到行
Ctrl+P Go to File... 转到文件
Ctrl+Shift+O Go to Symbol... 转到符号
Ctrl+Shift+M Show Problems panel 显示问题面板
F8 Go to next error or warning 跳转下一跳错误或警告
Shift+F8 Go to previous error or warning 跳转上一跳错误或警告
Ctrl+Shift+Tab Navigate editor group history 导航到编辑器组历史
Alt+ ← / → Go back / forward 前进/后退
Ctrl+M Toggle Tab moves focus 切换标签页焦点

Search and replace 查找与替换
Ctrl+F Find 查找
Ctrl+H Replace 替换
F3 / Shift+F3 Find next/previous 前/后查找
Alt+Enter Select all occurences of Find match 高亮所有查找关键字
Ctrl+D Add selection to next Find match 跳转下一个匹配关键字
Ctrl+K Ctrl+D Move last selection to next Find match 跳转上一个匹配关键字
Alt+C / R / W Toggle case-sensitive / regex / whole word 切换 大小写敏感/正则/全字匹配
Multi-cursor and selection 多指针选择
Alt+Click Insert cursor 插入指针
Ctrl+Alt+ ↑ / ↓ Insert cursor above / below 前/后插入指针
Ctrl+U Undo last cursor operation 取消上次操作
Shift+Alt+I Insert cursor at end of each line selected 最后一行插入
Ctrl+I Select current line 选择当前行
Ctrl+Shift+L Select all occurrences of current selection  全选当前高亮行
Ctrl+F2 Select all occurrences of current word 全选当前高亮文字
Shift+Alt+→ Expand selection 展开选择
Shift+Alt+← Shrink selection 折叠选择
Shift+Alt + (drag mouse)  Column (box) selection 列选模式
Ctrl+Shift+Alt + (arrow key) Column (box) selection 列选模式
Ctrl+Shift+Alt +PgUp/PgDn Column (box) selection page up/down 列选模式翻页
Rich languages editing 富语言编辑
Ctrl+Space Trigger suggestion 触发提示
Ctrl+Shift+Space Trigger parameter hints 触发参数提示
Shift+Alt+F Format document 格式化文件
Ctrl+K Ctrl+F Format selection 格式化所选
F12 Go to Definition 转到定义
Alt+F12 Peek Definition 剽窃定义
Ctrl+K F12 Open Definition to the side 侧边栏打开定义
Ctrl+. Quick Fix 快速修复
Shift+F12 Show References 展示引用
F2 Rename Symbol 重命名标记
Ctrl+K Ctrl+X Trim trailing whitespace 修剪空格
Ctrl+K M Change file language 修改文件语言
Editor management 编辑器管理
Ctrl+F4, Ctrl+W Close editor 关闭编辑器
Ctrl+K F Close folder 关闭文件夹
Ctrl+\ Split editor 分割编辑器
Ctrl+ 1 / 2 / 3 Focus into 1 st , 2 nd or 3 rd editor group 定位聚焦编辑器
Ctrl+K Ctrl+ ←/→ Focus into previous/next editor group 定位聚焦上一个/下一个编辑器
Ctrl+Shift+PgUp / PgDn Move editor left/right 移动当前编辑器靠左/右
Ctrl+K ← / → Move active editor group 移动活动编辑器组

File management 文件管理
Ctrl+N New File 新建文件
Ctrl+O Open File... 打开文件
Ctrl+S Save 保存
Ctrl+Shift+S Save As... 另存
Ctrl+K S Save All 全部保存
Ctrl+F4 Close 关闭
Ctrl+K Ctrl+W Close All 全部关闭
Ctrl+Shift+T Reopen closed editor 重开上次关闭
Ctrl+K Enter Keep preview mode editor open 保持上次模式打开
Ctrl+Tab Open next 打开下一个
Ctrl+Shift+Tab Open previous 打开前一个
Ctrl+K P Copy path of active file 拷贝活动文件
Ctrl+K R Reveal active file in Explorer 做Explorer中定位活动文件
Ctrl+K O Show active file in new window/instance 新窗口中显示当前文件
Display 显示
F11 Toggle full screen 全屏
Shift+Alt+1 Toggle editor layout (horizontal/vertical) 触发层次方式(横/纵)
Ctrl+ = / - Zoom in/out 扩展/缩小 视角
Ctrl+B 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 显示调试
Ctrl+Shift+X Show Extensions 显示扩展
Ctrl+Shift+H Replace in files 文件替换
Ctrl+Shift+J Toggle Search details 搜索细节 
Ctrl+Shift+U Show Output panel 显示输出面板
Ctrl+Shift+V Open Markdown preview 打开前一标记
Ctrl+K V Open Markdown preview to the side 打开前一标记到旁边
Ctrl+K Z Zen Mode (Esc Esc to exit) 禅编程(全屏最大化)
Debug 调试
F9 Toggle breakpoint 打断点
F5 Start/Continue 开始/继续
Shift+F5 Stop 停止
F11 / Shift+F11 Step into/out 进入/跳出下一步
F10 Step over 跳过
Ctrl+K Ctrl+I Show hover 显示调用
Integrated terminal 完美终端
Ctrl+` Show integrated terminal 显示完美终端
Ctrl+Shift+` Create new terminal 创建终端
Ctrl+C Copy selection 复制选择
Ctrl+V Paste into active terminal 粘贴进终端
Ctrl+↑ / ↓ Scroll up/down 上/下滚
Shift+PgUp / PgDn Scroll page up/down 上/下翻页
Ctrl+Home / End Scroll to top/bottom 翻滚到顶/底
Keyboard shortcuts for Windows 窗口快捷键

Other operating systems’ keyboard shortcuts and additional unassigned shortcuts available at aka.ms/vscodekeybindings