
Memorize and Code at Lightning Speed! Convenient Shortcuts for Visual Studio Code
Visual Studio Code has now become a standard development editor. We've put together a collection of convenient shortcuts that, once memorized, will enable you to code at lightning speed.
Posted at: 2023.10.24
Editor Operation Shortcuts
For coding in Visual Studio Code, you can code faster by minimizing mouse use when writing code or opening files.
Shortcuts for fast coding depend on personal preference, but even just using the default shortcuts can significantly reduce key typing and mouse operations.
| Shortcut | Function |
|---|---|
| Ctrl + P | Quickly open files (Quick Open) |
| Alt + ↑/↓ | Move the cursor line up or down |
| Alt + Shift + I | Insert cursors into multiple lines |
| Alt + Click | Add/remove multiple cursors |
| Ctrl + G | Go to a specific line (Go to Line) |
| Ctrl + Shift + K | Delete the current line |
| Ctrl + Enter | Insert a new line below |
| Ctrl + Shift + Enter | Insert a new line above |
| Alt + Shift + ↓ | Copy the cursor line's text downward |
| Alt + Shift + ↑ | Copy the cursor line's text upward |
| Ctrl + D | Select the next matching text of the selected text |
| Ctrl + U | Go back to the previous cursor position |
| Ctrl + L | Select the entire cursor line |
| Ctrl + ] | Increase indent |
| Ctrl + [ | Decrease indent |
Appearance Operation Shortcuts
When coding in Visual Studio Code, operation panels can sometimes get in the way. By closing panels with shortcuts while coding, you can code more comfortably.
| Shortcut | Function |
|---|---|
| Ctrl + B | Toggle the sidebar display |
| Ctrl + Shift + E | Show the file explorer |
| Ctrl + Shift + F | Search/replace within files, show panel |
Git-Related Shortcuts
When using Visual Studio Code, you often operate on Git repositories daily. By remembering these shortcuts, you can operate the repository without using a mouse or trackpad, speeding up your work.
| Shortcut | Function |
|---|---|
| Ctrl + Shift + G | Toggle the Git tab display |
| Ctrl + Enter | Stage changes in source control |
| Ctrl + Shift + Enter | Unstage changes in source control |
| Ctrl + 0 | Commit changes in source control |
| Ctrl + K, Ctrl + C | Enter a commit message in source control |
| Ctrl + K, Ctrl + A | Stage all changes in source control |
| Ctrl + K, S | Unstage all changes in source control |
| Alt + C | Compare files in source control |
| Alt + M | Merge file changes in source control |
| Alt + A | Stage all changes in source control |
| Alt + U | Unstage changes in source control |