vscode 快捷键大全

vscode 快捷键大全

官方文档

widnows
liunx
mac

挺简单的,文档描述清晰内容排版也不错,一看就懂,这里写的是我自己翻译的(太过简单的没必要翻译),同时也为了方便自己查阅和使用

[注意] 插件的快捷键请在插件说明(文档)内查看,vscode不提供此类快捷键

Visual Studio Code (Keyboard Shortcuts for Windows)

按键说明
General普通
Ctrl+Shift+P,F1 Show Command Palette
Ctrl+PQuick Open, Go to File…
Ctrl+Shift+NNew window/instance
Ctrl+Shift+WClose window/instance
Ctrl+,User Settings
Ctrl+K Ctrl+SKeyboard Shortcuts (显示所有快捷键,太多专业名词调到中文你就懂了)
Basic editing基本编辑
Ctrl+XCut line (empty selection)
Ctrl+CCopy line (empty selection)
Alt+ ↑ / ↓Move line up/down
Shift+Alt + ↓ / ↑Copy line up/down
Ctrl+Shift+KDelete line
Ctrl+EnterInsert line below(在当前输入行的下面插入一行)
Ctrl+Shift+EnterInsert line above(在当前输入行的下面插入一行,试了一下没成功)
Ctrl+Shift+\Jump to matching bracket(跳转到匹配的标签)
Ctrl+] / [Indent/outdent line(缩进取消缩进,注意中间那个][中间的斜杠不需要按)
Home / EndGo to beginning/end of line
Ctrl+HomeGo to beginning of file(跳转至文件开始处)
Ctrl+EndGo to end of file(跳转到文件结尾处)
Ctrl+↑ / ↓Scroll line up/down(滚动一行)
Alt+PgUp / PgDnScroll 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+0Fold (collapse) all regions(收起所有0级代码块,还有1~9级)
Ctrl+K Ctrl+JUnfold (uncollapse) all regions(打开所有代码块)
Ctrl+K Ctrl+CAdd line comment(添加行注释)
Ctrl+K Ctrl+URemove line comment(删除行注释)
Ctrl+/Toggle line comment(切分编辑窗口)
Shift+Alt+AToggle block comment(添加块级注释)
Alt+ZToggle word wrap(切换自动换行,效果同ctrl+z)
Navigation导航
Ctrl+TShow all Symbols(搜索文件,输入标记搜索文件标记,效果同ctrl+p)
Ctrl+GGo to Line…
Ctrl+PGo to File…
Ctrl+Shift+OGo to Symbol…(ctrl+t的搜索框中输入@)
Ctrl+Shift+MShow Problems panel(打开panel中的问题部分,按ctrl+j打开panel)
F8Go to next error or warning
Shift+F8Go to previous error or warning
Ctrl+Shift+TabNavigate editor group history(切换打开中的窗口)
Alt+ ← / →Go back / forward (整词移动光标)
Ctrl+MToggle Tab moves focus(切换标签移动焦点,无效果)
Search and replace查找和替换
Ctrl+FFind
Ctrl+HReplace
F3 / Shift+F3Find next/previous(在搜索结果中移动焦点)
Alt+EnterSelect all occurences of Find match(选中所有匹配)
Ctrl+DAdd selection to next Find match(选中下一个匹配)
Ctrl+K Ctrl+DMove last selection to next Find match
Alt+C / R / WToggle case-sensitive / regex / whole word(搜索窗口切换大小写,正则,全匹配)
Multi-cursor and selection键鼠多选
Alt+ClickInsert cursor(点选输入位置)
Ctrl+Alt+ ↑ / ↓Insert cursor above / below(脑子进水快捷键,windows下根本用不了)
Ctrl+UUndo last cursor operation(反alt+click)
Shift+Alt+IInsert cursor at end of each line selected
Ctrl+L Selectcurrent line(整行选中)
Ctrl+Shift+LSelect all occurrences of current selection(选中当前选中的所有匹配)
Ctrl+F2 Selectall occurrences of current word(选中当前单词的所有匹配)
Shift+Alt+→Expand selection(扩大选择,效果不如单词选择或者整行选择)
Shift+Alt+←Shrink selection(缩小选择)
Shift+Alt +(drag mouse)Column (box) selection(按住shift+alt然后鼠标左键点住拖动,点到那选到那)
Ctrl+Shift+Alt + (arrow key)Column (box) selection(就近选择当前光标位置)
Ctrl+Shift+Alt+PgUp/PgDnColumn (box) selection page up/down(就近选择一页)
Rich languages editing丰富语言编辑器
Ctrl+SpaceTrigger suggestion(触发建议)
Ctrl+Shift+SpaceTrigger parameter hints(触发参数提示)
Shift+Alt+FFormat document
Ctrl+K Ctrl+FFormat selection(格式化选定内容)
F12Go to Definition
Alt+F12Peek Definition(查看定义)
Ctrl+K F12Open Definition to the side
Ctrl+.Quick Fix
Shift+F12Show References(转到引用)
F2Rename Symbol(重命名符号)
Ctrl+K Ctrl+XTrim trailing whitespace(裁剪尾随空格)
Ctrl+K MChange file language(切换文件语言)
Editor management编辑器管理
Ctrl+F4, Ctrl+WClose editor
Ctrl+K FClose folder(关闭窗口回到初始界面)
Ctrl+| Split editor
Ctrl+ 1 / 2 / 3Focus into 1st, 2nd or 3rd editor group
Ctrl+K Ctrl+ ←/→Focus into previous/next editor group
Ctrl+Shift+PgUp / PgDnMove editor left/right(向左/右移动编辑区)
Ctrl+K ← / →Move active editor group(向左/右移动编辑器组)
File management文件管理
Ctrl+NNew File
Ctrl+OOpen File…
Ctrl+SSave
Ctrl+Shift+SSave As…
Ctrl+K SSave All
Ctrl+F4Close
Ctrl+K Ctrl+WClose All
Ctrl+Shift+TReopen closed editor
Ctrl+KEnter Keep preview mode editor open
Ctrl+TabOpen next
Ctrl+Shift+TabOpen previous
Ctrl+K PCopy path of active file
Ctrl+K RReveal active file in Explorer
Ctrl+K OShow active file in new window/instance(当前文件在新窗口中打开)
Display显示
F11Toggle full screen
Shift+Alt+0Toggle editor layout (horizontal/vertical)(垂直或水平布局)
Ctrl+ = / -Zoom in/out (缩放)
Ctrl+BToggle Sidebar visibility
Ctrl+Shift+EShow Explorer / Toggle focus
Ctrl+Shift+FShow Search
Ctrl+Shift+GShow Source Control
Ctrl+Shift+DShow Debug
Ctrl+Shift+XShow Extensions
Ctrl+Shift+HReplace in files(侧边替换栏)
Ctrl+Shift+JToggle Search details
Ctrl+Shift+UShow Output panel
Ctrl+Shift+VOpen Markdown preview
Ctrl+K VOpen Markdown preview to the side
Ctrl+K ZZen Mode (Esc Esc to exit)
Debug调试
F9Toggle breakpoint
F5Start/Continue
Shift+F5Stop
F11 / Shift+F11Step into/out
F10Step over
Ctrl+K Ctrl+IShow hover
Integrated terminal集成终端
Ctrl+`Show integrated terminal
Ctrl+Shift+`Create new terminal
Ctrl+CCopy selection
Ctrl+VPaste into active terminal
Ctrl+↑ / ↓Scroll up/down
Shift+PgUp / PgDnScroll page up/down
Ctrl+Home / EndScroll to top/bottom

[Other operating systems’ keyboard shortcuts and additional unassigned shortcuts available at aka.ms/vscodekeybinding]
一个前端开发者的笔记

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值