Visual Studio Code Shortcuts快捷键

General Shortcuts

Shortcut KeyDescriptions
Ctrl+Shift+P, F1Show Command Palette
Ctrl+PQuick Open, Go to File
Ctrl+Shift+NNew window
Ctrl+Shift+WClose window
Ctrl+,User Settings
Ctrl+K Ctrl+SKeyboard Shortcuts

Basic Editing Shortcuts

Shortcut KeyDescriptions
Ctrl+XCut line
Ctrl+CCopy line
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
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

Navigation Shortcuts

Shortcut KeyDescriptions
Ctrl+TShow all Symbols
Ctrl+GGo to Line
Ctrl+PGo to File
Ctrl+Shift+OGo to Symbol
Ctrl+Shift+MShow Problems panel
F8Go to the next error
Shift+F8Go to previous error
Ctrl+Shift+TabNavigate editor group history
Alt+ ← / →Go back / forward
Ctrl+MToggle Tab moves the focus

Toggle Tab moves focus Shortcuts

Shortcut KeyDescriptions
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 Shortcuts

Shortcut KeyDescriptions
Alt+ClickInsert cursor
Ctrl+Alt+ ↑ / ↓Insert cursor above / below
Ctrl+UUndo last cursor operation
Shift+Alt+IInsert cursor at end of each line selected
Ctrl+ISelect current line
Ctrl+Shift+LSelect all occurrences of the current selection
Ctrl+F2Select all occurrences of the current word
Shift+Alt+→Expand selection
Shift+Alt+←Shrink selection

Editor Management Shortcuts

Shortcut KeyDescriptions
Ctrl+F4, Ctrl+WClose editor
Ctrl+K FClose folder
Ctrl+\Split editor
Ctrl+ 1 / 2 / 3Focus into 1 st, 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 Shortcuts​​​​​​​

Shortcut KeyDescriptions
Ctrl+NNew File
Ctrl+OOpen File
Ctrl+SSave
Ctrl+Shift+SSave
Ctrl+K SSave All
Ctrl+F4Close
Ctrl+K Ctrl+WClose All
Ctrl+Shift+TReopen closed editor
Ctrl+K EnterKeep preview mode editor open
Ctrl+TabOpen next
Ctrl+Shift+TabOpen previous
Ctrl+K PCopy path of an active file
Ctrl+K RReveal active file in Explorer
Ctrl+K OShow active file in a new window/instance

Debug Shortcuts

Shortcut KeyDescriptions
F9Toggle breakpoint
F5Start/Continue
Shift+F5Stop
F11 / Shift+F11Step into/out
F10Step over
Ctrl+K Ctrl+IShow hover

Integrated Terminal Shortcuts 

Shortcut KeyDescriptions
Ctrl+`Show integrated terminal
Ctrl+Shift+`Create a new terminal
Ctrl+CCopy selection
Ctrl+VPaste into an active terminal
Ctrl+↑ / ↓Scroll up/down
Shift+PgUp / PgDnScroll page up/down
Ctrl+Home / EndScroll to the top/bottom

常用shortcuts:批量注释+批量取消注释

Ctrl+k       #批量注释,大小写不变

Ctrl+k+u   #批量注释,大写全变小写

Ctrl+q       #批量取消注释

参考链接:https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Visual Studio Code中,有很多内置的快捷键可以帮助提高开发效率。以下是一些常用的内置快捷键: 1. 跳转到文件:在Ctrl P窗口下直接输入文件名即可跳转到文件。 2. 显示错误或警告:使用Ctrl Shift M快捷键可以显示错误或警告信息。 3. 跳转到指定行数:使用Ctrl G快捷键,然后输入行数,可以直接跳转到指定行数。 4. 跳转到symbol:使用Ctrl Shift O快捷键,然后输入@符号,可以搜索变量或函数并跳转到相应位置。 5. 根据分类跳转symbol:使用Ctrl Shift O快捷键,然后输入:符号,可以按分类查找属性或函数并跳转。 6. 根据名字查找symbol:使用Ctrl T快捷键,可以根据名称查找symbol。 7. 打开命令面板:使用F1或Ctrl Shift P快捷键可以打开命令面板,可以在输入框内输入任何命令。 8. 代码格式化:使用Shift Alt F快捷键可以格式化代码。 9. 复制或剪切当前行/选中内容:使用Ctrl C或Ctrl V快捷键可以复制或剪切当前行或选中的内容。 10. 上下移动一行:使用Alt Up或Alt Down快捷键可以将当前行上下移动一行。 11. 复制当前行:使用Shift Alt Up或Shift Alt Down快捷键可以复制当前行。 12. 在当前行上下方插入一行:使用Ctrl Enter或Ctrl Shift Enter快捷键可以在当前行的上方或下方插入一行。 这些是Visual Studio Code中的一些常用内置快捷键,可以帮助提高开发效率。你也可以通过按下F1键或Ctrl Shift P键打开命令面板,并输入"Keyboard Shortcuts"来查看所有可用的快捷键设置。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [Visual Studio Code 常用快捷键](https://blog.csdn.net/weixin_44181419/article/details/119946920)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值