This article will share with you vscode shortcut keys to improve development efficiency. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
In daily development, using VsCode shortcut keys can improve development efficiency!
Commonly used General
Press |
Function |
Ctrl Shift P, F1 |
Show Command Palette |
Ctrl P |
Quick Open |
Ctrl Shift N |
New window/instance |
Ctrl Shift W |
Close window /InstanceClose window/instance |
Basic editing
Press |
Function |
##Ctrl X | Cut line (empty selection) |
Ctrl C | Copy line (empty selection) |
Alt ↑ / ↓ | Up /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 brackets Jump to matching bracket |
|
Ctrl ] / [
Indent/outdent line |
| ##Home
Go to beginning of line |
| End
Go to end of line |
| Ctrl Home
Go to the beginning of file |
| Ctrl End
Go to the end of file |
| Ctrl ↑ / ↓
Scroll line up/down |
| Alt PgUp / PgDown
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 Add line comment
|
Ctrl K Ctrl U |
Remove line comment
|
Ctrl / |
Toggle line commentToggle line comment
|
Shift Alt A |
Toggle block comment
|
Alt Z |
Toggle word wrap
|
Recommended learning: "vscode tutorial"
Navigation
Press Press | Function |
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 | Navigation editor group HistoryNavigate editor group history |
Alt ←/→ | Go back / forward |
Ctrl M | Toggle Tab moves focus |
Search and replace
##Press
Function |
|
##Ctrl F
Find |
| Ctrl H
Replace |
| F3 / Shift F3
Find next/previous |
| Alt Enter
Select all occurences of Find match |
| Ctrl D
will select 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
PressFunction |
|
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 the mouse) | Column (box) selectionColumn (box) selection
##Ctrl Shift Alt (arrow key) |
Column (box) selectionColumn (box) selection |
Ctrl Shift Alt PgUp / PgDown |
Column (box) selection page up/down |
Rich languages editing
Press |
Function |
Ctrl Space |
Trigger suggestionTrigger suggestion |
##Ctrl Shift Space | Trigger parameter hints |
Tab | Emmet expand abbreviation |
Shift Alt F | Format document |
Ctrl K Ctrl F | Format selection |
F12 | Go to definitionGo to Definition |
Alt F12 | Peek Definition |
Ctrl K F12 | Open definition to edge Open Definition to the side |
Ctrl . | Quick Fix |
Shift F12 | Display ReferenceShow References |
F2 | Rename SymbolRename Symbol |
##Ctrl Shift ./,
Replace with next/previous value |
|
Ctrl K Ctrl X
Trim trailing whitespace |
| Ctrl K M
Change file language |
|
##Editor managementEditor management
Press
Function |
|
##Ctrl F4, Ctrl W
Close the editor Close editor
|
Ctrl K F |
Close folderClose folder
|
Ctrl \ |
Split edit Split editor
|
Ctrl 1 / 2 / 3 |
Focus into 1st, 2nd or 3rd editor group
|
Ctrl K Ctrl ←/→ |
Focus into previous/next editor group
|
Ctrl Shift PgUp / PgDown |
Move editor left/right
| ##Ctrl K ← / → | Move Move active editor group
|
| File managementFile management
Press
Function
|
##Ctrl N |
New FileNew File
Ctrl O |
Open File... |
Ctrl S |
SaveSave |
Ctrl Shift S |
Save As... Save As... |
Ctrl K S |
Save AllSave All |
Ctrl F4 |
Close |
Ctrl K Ctrl W |
Close allClose All |
Ctrl Shift T |
Reopen closed editor |
Ctrl K |
Enter Keep Open |
Ctrl Tab |
Open nextOpen next |
Ctrl Shift Tab |
Open previous Open previous |
Ctrl K P |
Copy path of active file |
Ctrl K R |
Reveal active file in Explorer |
Ctrl K O |
Show active file in new window/instance |
Display
Press |
Function |
F11 |
Toggle full screenToggle full screen |
Shift Alt 1 |
Toggle editor layoutToggle editor layout |
Ctrl = / - |
Zoom in/outZoom in/out |
##Ctrl B | Toggle Sidebar visibility Toggle Sidebar visibility |
Ctrl Shift E | Show Explorer / Toggle focus |
Ctrl Shift F | Show SearchShow Search |
Ctrl Shift G | Show Git Show Git |
Ctrl Shift D | Show DebugShow Debug |
Ctrl Shift X | Show extensionsShow Extensions |
Ctrl Shift H | Replace files Replace in files |
Ctrl Shift J | Toggle Search details |
Ctrl Shift C | Open new command prompt/terminal |
Ctrl Shift U | Show Output panel |
Ctrl Shift V | Toggle Markdown previewToggle Markdown preview |
Ctrl K V | Open Markdown preview to the side |
DebugDebug
##Press
Function |
|
F9
Toggle breakpoint |
|
F5
Start/ContinueStart/ Continue |
|
Shift F5
Stop |
|
F11 / Shift F11
Next/Previous step Step into/out |
|
F10
SKIPStep over |
|
Ctrl K Ctrl I
Display HoverShow hover |
|
Integrated terminalIntegrated terminal
Press
Function |
|
Ctrl `
Show integrated terminal |
|
Ctrl Shift `
Create new terminal |
|
Ctrl Shift C
Copy selectionCopy selection |
|
Ctrl Shift V
Paste into active terminal |
|
Ctrl ↑ / ↓
Scroll up/down |
|
Shift PgUp / PgDown
Scroll page up/down |
|
Ctrl Home / End Scroll to top/bottom |
|
For more programming-related knowledge, please visit: Programming Video! !
|
|
|
The above is the detailed content of Memorize these VSCode shortcut keys to improve your development efficiency!. For more information, please follow other related articles on the PHP Chinese website!