Here we can see, “Essential Keyboard Shortcuts for Visual Studio Code”
Navigate VS Code effortlessly with these top keyboard shortcuts.
Microsoft Visual Studio Code debuted only a couple of years ago, but it’s quickly become one among the foremost popular text editors available. Its combination of an easy interface with powerful IDE-like features makes it an especially fashionable programmer, but it’s even as useful for writers and anyone who manipulates text files.
Visual Studio Code supports nearly every programing language that exists. If support isn’t built-in, you’ll add it through the app’s extension browser. VS Code even has native features to support collaborative programming. Plus, it’s many keyboard shortcuts to assist you in navigating the app interface effortlessly.
And what’s more, you’ll discover the foremost useful VS Code keyboard shortcuts with this cheat sheet!
Because of the sheer number of users on Windows, that OS is the main focus of this cheat sheet. Don’t be concerned if you’re a Mac user, though, as all of those keyboard shortcuts work on macOS also. Use the control key rather than the Ctrl key and, therefore, the Option key rather than Alt. If any shortcuts vary quite that, we’ll mention both.
The Visual Studio Code Keyboard Shortcuts Cheat Sheet
On a Mac keyboard, replace Ctrl with Cmd and Alt with Option within the shortcuts.
Shortcut | Action |
---|---|
Basic Functionality | |
Ctrl + Shift + P | Open Command Palette |
Ctrl + , | Open app settings |
Ctrl + K, Ctrl + S | Display keyboard shortcuts |
Ctrl + Shift + X | Switch to Extensions pane |
Ctrl + N | New file |
Ctrl + Shift + N | New window |
¹Ctrl + F4 | Close file |
Ctrl + Shift + W | Close window |
¹F11 | Toggle Full Screen mode |
Ctrl + B | Toggle sidebar visibility |
File Management | |
Ctrl + O | Open file |
Ctrl + S | Save file |
Ctrl + Shift + S | Save as… |
Ctrl + K, S | Save all files |
Ctrl + K, Ctrl + W | Close all |
Ctrl + Shift + T | Reopen last closed |
Editing Commands | |
Ctrl + C | Copy selection or current line |
Ctrl + X | Cut selection or current line |
Ctrl + V | Paste |
Ctrl + Shift + K | Delete line |
Home | Go to beginning of line |
End | Go to end of line |
Ctrl + Home | Go to beginning of file |
Ctrl + End | Go to end of file |
Alt + Up / Down | Move line up or down |
Ctrl + ] | Indent line |
Ctrl + [ | Outdent line |
Ctrl + / | Comment out line |
Shift + Alt + A | Comment out region |
Folding | |
Ctrl + Shift + [ | Fold region |
Ctrl + Shift + ] | Unfold region |
Ctrl + K, Ctrl + [ | Fold all subregions |
Ctrl + K, Ctrl + ] | Unfold all subregions |
Ctrl + K, Ctrl + 0 | Fold all regions |
Ctrl + K, Ctrl + J | Unfold all regions |
Editor Navigation | |
Ctrl + P | Go to file |
Ctrl + G | Go to line |
Ctrl + T | Show all symbols |
Ctrl + Shift + O | Go to symbol |
F8 | Go to next error or warning |
Shift + F8 | Go to previous error or warning |
Ctrl + Shift + M | Show Problems panel |
¹Alt + Left | Go back |
¹Alt + Right | Go forward |
Find and Replace | |
Ctrl + F | Open Find dialog |
Ctrl + H | Open Replace dialog |
Ctrl + Shift + H | Replace in files |
¹F3 | Find next |
¹Shift + F3 | Find previous |
Alt + Enter | Select all matches for search term |
Ctrl + D | Add current selection to Find match |
Ctrl + K, Ctrl + D | Move previous selection to next Find match |
Selection and Multiple Cursors | |
Ctrl + L | Select current line |
Ctrl + Shift + L | Select all instances of current selection |
Ctrl + F2 | Select all matches of current word |
¹Shift + Alt + Right Arrow | Expand selection |
¹Shift + Alt + Left Arrow | Shrink selection |
Alt + Click | Insert cursor |
Ctrl + Alt + Up Arrow / Down Arrow | Insert cursor above or below current line |
Ctrl + U | Undo last cursor |
Shift + Alt + I | Insert cursor at the end of each selected line |
Split Editor Management | |
Ctrl + \ | Split editor |
Ctrl + 1 / 2 / 3 | Focus on editor pane 1, 2, or 3 |
Ctrl + K, Ctrl + Right Arrow / Left Arrow | Focus on next / previous editor pane |
¹Ctrl + Shift + PgUp | Move editor left |
¹Ctrl + Shift + PgDown | Move editor right |
Integrated Terminal | |
¹Ctrl + ` | Show integrated terminal |
¹Ctrl + Shift + ` | Create new terminal instance |
Ctrl + Up Arrow / Down Arrow | Scroll up / down |
Ctrl + Home / End | Scroll to top / bottom |
macOS-Specific Shortcuts | |
Cmd + W | Close file |
Cmd + Ctrl + F | Toggle full screen |
Cmd + – | Go back |
Cmd + Shift + – | Go forward |
Cmd + G | Find next |
Cmd + Shift + G | Find previous |
Cmd + Control + Shift + Right Arrow | Expand selection |
Cmd + Control + Shift + Left Arrow | Shrink selection |
Cmd + K, Cmd + Shift + Left | Move editor left |
Cmd + K, Cmd + Shift + Right | Move editor right |
Control + ` | Show integrated terminal |
Control + Shift + ` | Create new terminal instance |
¹The corresponding macOS shortcut is listed under the macOS-Specific Shortcuts section at the end of the cheat sheet. |
Looking for More Ways to Make the Most of VS Code?
Thanks to becoming a Visual Studio Code computer user, the keyboard shortcuts here will have you ever well on yours. That said, there are more ways in which you’ll make the software even better-suited to your workflow.
Conclusion
I hope you found this guide useful. If you’ve got any questions or comments, don’t hesitate to use the shape below.
User Questions:
- How does one run a shortcut in Visual Studio using keyboard shortcuts?
We will do that without the assistance of our beloved mouse (almost).
- Open Visual Studio Code.
- Once Visual Studio Code is open, press: CTRL+SHIFT+X . …
- You see now an inventory of keymaps. …
- Press ⬇ until you’ve got selected the Atom Keymap . …
- Sadly I can’t find a way for choosing the Install button.
- How do I reset keyboard shortcuts in Visual Studio?
Click File > Preferences > Keyboard Shortcuts. there’s a triple-dot (…) at the top-right hand corner. Click thereon and choose “Show User Keybindings” Delete your listed keybindings.
- What does F5 neutralize Visual Basic?
F5 is employed to start your project in debug mode, and Ctrl-F5 is employed to start your project without debug mode.
- Where are Visual Studio shortcuts?
Popular keyboard shortcuts for Visual Studio
You can search the shortcut for any command by opening the choices panel, expanding the Environment node, then choosing Keyboard.
- Having to figure on a small laptop. What are the essential keyboard shortcuts to urge work done (Windows)?
Having to work on small laptop. What are the essential keyboard short cuts to get work done (Windows)? from vscode