DEV Community

Joe Brian
Joe Brian

Posted on

20 VS Code Keyboard Shortcuts for Windows

Developers who're working for a company will know the importance of every second. There're a lot of things that you can do to code faster.

Among all those, knowing some important keyboard shortcuts can help you save a lot of your development time.

In this post [Source:Wooberly ], I'm gonna list down some useful VS code shortcuts to help you. Let's dive right in.

20 Best VS Code Shortcuts

#1 Ctrl + p - Quick open file

#2 Ctrl + Shift+N - New window

#3 Ctrl + Shift + W - Close window

#4 Alt + up/down arrow - Move up or down a line

#5 Shift + Alt + up/down arrow - Copy a line

#6 Ctrl + / - Toggle line comment

#7 Shift + Alt + A - Block comment

#8 Ctrl + G - Go to line

#9 Ctrl + Shift + M - Show problems Panel

#10 F8 - Next error

#11 Shift + F8 - Previous error

#12 Shift + Alt + F - Format document

#13 Ctrl + L - Select the current line

#14 F12 - Definition

#15 Ctrl + \ - Split the editor

#16 F5 - Debug start

#17 Shift + F5 - Debug stop

#18 F11 - Toggle fullscreen

#19 Ctrl + B - Sidebar visibility

#20 Ctrl + Shift + T - Reopen the closed editor.

Hope it will be useful to you. Will share other tips and tricks in the next one.

joebrain032 image

Top comments (6)

alexanderjanke profile image
Alex Janke

Ctrl + K M - Select language mode of the current file.
Goes hand in hand with Ctrl + Shift + N. So you create a new file and can instantly tell it to be of type html, csv, whatever.

Ctrl + K + T to quickly switch your theme.
And my personal favourite is Ctrl + K Z to enable zen mode (hide all other files and folder structure to just focus on your code.

Most of these can be found right within VsCode. At the top menu is Help and there you can find the Keyboard Shortcut Reference.
As a link for the more lazy people like me: VsCode Keyboard Reference

joebrain032 profile image
Joe Brian

Thanks for sharing

waylonwalker profile image
Waylon Walker

Ctrl + Shift + P Is definitely my favorite as it reminds me of all of the ones that I forget and gives me a way to do most things without leaving the keyboard.

My favorite keyboard shortcuts are for navigating between the terminal and editor quickly. Here is how I setup my keybindings to mirror my tmux setup for navigating vscode.

joebrain032 profile image
Joe Brian

Thanks Man

sinepel profile image
Constantin Boulanger

Thank you for sharing these shortcuts !

I've created myself an article where I share my favourite extensions for VSCode !

Here : My favourite extensions for Visual Studio Code

joebrain032 profile image
Joe Brian

Sure will look in to it.