Essential Keyboard Shortcuts for Visual Studio Code



Microsoft Visual Studio Code debuted only a few years ago, but it has quickly become one of the most popular text editors available. Its combination of a simple user interface with powerful IDE-like features makes it especially popular with programmers, but it’s just as useful for writers and anyone who manipulates text files.
Visual Studio Code supports nearly every programming language that exists. If support isn’t built-in, you can add it through the app’s extension browser. VS Code even has native features to support collaborative programming . Plus, it has plenty of keyboard shortcuts to help you navigate the app interface effortlessly.
And what’s more, you can discover the most 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 worry if you’re a Mac user though, as all of these keyboard shortcuts work on macOS as well. Simply use the Command key instead of the Ctrl key and the Option key instead of Alt . If any shortcuts vary more than that, we’ll mention both.
FREE DOWNLOAD: This cheat sheet is available as a downloadable PDF from our distribution partner, TradePub. You will have to complete a short form to access it for the first time only. Download The Visual Studio Code Keyboard Shortcuts Cheat Sheet .
The Visual Studio Code Keyboard Shortcuts Cheat Sheet
On a Mac keyboard, replace Ctrl with Cmd and Alt with Option in 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...

Top