logo
🛠️ 开发工具

VS Code

VS Code Cheat Sheet - 快速参考指南,收录常用语法、命令与实践。

📂 分类 · 开发工具🧭 Markdown 速查🏷️ 2 个标签
#vscode#editor
向下滚动查看内容
返回全部 Cheat Sheets

Keyboard shortcuts for Windows

General
ShortcutAction
Ctrl Shift PShow 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

{.shortcuts}

Basic Editing
ShortcutAction
Ctrl XCut line (empty selection)
Ctrl CCopy line (empty selection)
Alt Up/DownMove line up/down
Shift Alt Up/DownCopy 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 Up/DownScroll line up/down
Alt PgUp/PgDownScroll 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

{.shortcuts}

Navigation
ShortcutAction
Ctrl TShow all Symbols
Ctrl GGo to Line...
Ctrl PGo to File...
Ctrl Shift OGo to Symbol...
Ctrl Shift MShow Problems panel
F8Go to next error or warning
Shift F8Go to previous error or warning
Ctrl Shift TabNavigate editor group history
Alt Left/RightGo back/forward
Ctrl MToggle Tab moves focus

{.shortcuts}

Search and replace
ShortcutAction
Ctrl FFind
Ctrl HReplace
F3Find next
Shift F3Find previous
Alt EnterSelect all occurrences 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

{.shortcuts}

Multi-cursor and selection
ShortcutAction
Alt ClickInsert cursor
Ctrl Alt Up/DownInsert 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 current selection
Ctrl F2Select all occurrences of current word
Shift Alt RightExpand selection
Shift Alt LeftShrink selection
Shift Alt (drag mouse)Column (box) selection
Ctrl Shift Alt (arrow key)Column (box) selection
Ctrl Shift Alt PgUp/PgDownColumn (box) selection page up/down

{.shortcuts}

Rich languages editing
ShortcutAction
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

{.shortcuts}

Editor management
ShortcutAction
Ctrl F4Close editor
Ctrl WClose editor
Ctrl K FClose folder
Ctrl \Split editor
Ctrl 1/2/3Focus into 1st, 2nd, or 3rd editor group
Ctrl K Ctrl Left/RightFocus into previous/next editor group
Ctrl Shift PgUp/PgDownMove editor left/right
Ctrl K Left/RightMove active editor group

{.shortcuts}

File management
ShortcutAction
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 K EnterKeep 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

{.shortcuts}

Display
ShortcutAction
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)

{.shortcuts}

Debug
ShortcutAction
F9Toggle breakpoint
F5Start/Continue
Shift F5Stop
F11Step into
Shift F11Step out
F10Step over
Ctrl K Ctrl IShow hover

{.shortcuts}

Integrated terminal
ShortcutAction
Ctrl <code>`</code>Show integrated terminal
Ctrl Shift <code>`</code>Create new terminal
Ctrl CCopy selection
Ctrl VPaste into active terminal
Ctrl Up/DownScroll up/down
Shift PgUp/PgDownScroll page up/down
Ctrl Home/EndScroll to top/bottom

{.shortcuts}

Keyboard shortcuts for MacOS

General
ShortcutAction
⇧⌘P / F1Show Command Palette
⌘PQuick Open, Go to File…
⇧⌘NNew window/instance
⌘WClose window/instance
⌘,User Settings
⌘K ⌘SKeyboard Shortcuts

{.shortcuts}

Basic editing
ShortcutAction
⌘XCut line (empty selection)
⌘CCopy line (empty selection)
⌥↓ / ⌥↑Move line down/up
⇧⌥↓ / ⇧⌥↑Copy line down/up
⇧⌘KDelete line
⌘Enter / ⇧⌘EnterInsert line below/above
⇧⌘\Jump to matching bracket
⌘] / ⌘[Indent/outdent line
Home / EndGo to beginning/end of line
⌘↑ / ⌘↓Go to beginning/end of file
⌃PgUp / ⌃PgDnScroll line up/down
⌘PgUp /⌘PgDnScroll page up/down
⌥⌘[ / ⌥⌘]Fold/unfold region
⌘K ⌘[ / ⌘K ⌘]Fold/unfold all subregions
⌘K ⌘0 / ⌘K ⌘JFold/unfold all regions
⌘K ⌘CAdd line comment
⌘K ⌘URemove line comment
⌘/Toggle line comment
⇧⌥AToggle block comment
⌥ZToggle word wrap

{.shortcuts}

Multi-cursor and selection
ShortcutAction
⌥ +click Insert cursor
⌥⌘↑Insert cursor above
⌥⌘↓Insert cursor below
⌘UUndo last cursor operation
⇧⌥IInsert cursor at end of each line selected
⌘LSelect current line
⇧⌘LSelect all occurrences of current selection
⌘F2Select all occurrences of current word
⌃⇧⌘→ / ←Expand / shrink selection
⇧⌥ + drag mouseColumn (box) selection
⇧⌥⌘↑ / ↓Column (box) selection up/down
⇧⌥⌘← / →Column (box) selection left/right
⇧⌥⌘PgUpColumn (box) selection page up
⇧⌥⌘PgDnColumn (box) selection page down

{.shortcuts}

Search and replace
ShortcutAction
⌘FFind
⌥⌘FReplace
⌘G / ⇧⌘GFind next/previous
⌥EnterSelect all occurrences of Find match
⌘DAdd selection to next Find match
⌘K ⌘DMove last selection to next Find match

{.shortcuts}

Rich languages editing
ShortcutAction
⌃Space, ⌘ITrigger suggestion
⇧⌘SpaceTrigger parameter hints
⇧⌥FFormat document
⌘K ⌘FFormat selection
F12Go to Definition
⌥F12Peek Definition
⌘K F12Open Definition to the side
⌘.Quick Fix
⇧F12Show References
F2Rename Symbol
⌘K ⌘XTrim trailing whitespace
⌘K MChange file language

{.shortcuts}

Navigation
ShortcutAction
⌘TShow all Symbols
⌃GGo to Line...
⌘PGo to File...
⇧⌘OGo to Symbol...
⇧⌘MShow Problems panel
F8 / ⇧F8Go to next/previous error or warning
⌃⇧TabNavigate editor group history
⌃- / ⌃⇧-Go back/forward
⌃⇧MToggle Tab moves focus

{.shortcuts}

Editor management
ShortcutAction
⌘WClose editor
⌘K FClose folder
⌘\Split editor
⌘1 / ⌘2 / ⌘3Focus into 1st, 2nd, 3rd editor group
⌘K ⌘← / ⌘K ⌘→Focus into previous/next editor group
⌘K ⇧⌘← / ⌘K ⇧⌘→Move editor left/right
⌘K ← / ⌘K →Move active editor group

{.shortcuts}

File management
ShortcutAction
⌘NNew File
⌘OOpen File...
⌘SSave
⇧⌘SSave As...
⌥⌘SSave All
⌘WClose
⌘K ⌘WClose All
⇧⌘TReopen closed editor
⌘KEnter Keep preview mode editor open
⌃Tab / ⌃⇧TabOpen next / previous
⌘K PCopy path of active file
⌘K RReveal active file in Finder
⌘K OShow active file in new window/instance

{.shortcuts}

Display
ShortcutAction
⌃⌘FToggle full screen
⌥⌘0Toggle editor layout (horizontal/vertical)
⌘= / ⇧⌘-Zoom in/out
⌘BToggle Sidebar visibility
⇧⌘EShow Explorer / Toggle focus
⇧⌘FShow Search
⌃⇧GShow Source Control
⇧⌘DShow Debug
⇧⌘XShow Extensions
⇧⌘HReplace in files
⇧⌘JToggle Search details
⇧⌘UShow Output panel
⇧⌘VOpen Markdown preview
⌘K VOpen Markdown preview to the side
⌘K ZZen Mode (Esc Esc to exit)

{.shortcuts}

Debug
ShortcutAction
F9Toggle breakpoint
F5Start/Continue
F11 / ⇧F11Step into/ out
F10Step over
⇧F5Stop
⌘K ⌘IShow hover

{.shortcuts}

Integrated terminal
ShortcutAction
<code>⌃`</code>Show integrated terminal
<code>⌃⇧`</code>Create new terminal
⌘CCopy selection
⌘↑ / Scroll up/down
PgUp / PgDnScroll page up/down
⌘Home / EndScroll to top/bottom

{.shortcuts}

Also see

相关 Cheat Sheets

1v1免费职业咨询
logo

Follow Us

linkedinfacebooktwitterinstagramweiboyoutubebilibilitiktokxigua

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png

地址

Level 10b, 144 Edward Street, Brisbane CBD(Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
四川省成都市武侯区桂溪街道天府大道中段500号D5东方希望天祥广场B座45A13号
Business Hub, 155 Waymouth St, Adelaide SA 5000

Disclaimer

footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

匠人学院网站上的所有内容,包括课程材料、徽标和匠人学院网站上提供的信息,均受澳大利亚政府知识产权法的保护。严禁未经授权使用、销售、分发、复制或修改。违规行为可能会导致法律诉讼。通过访问我们的网站,您同意尊重我们的知识产权。 JR Academy Pty Ltd 保留所有权利,包括专利、商标和版权。任何侵权行为都将受到法律追究。查看用户协议

© 2017-2025 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572