Visual Studio Code (VS Code) has become one of the most popular editors used by programmer/developer due to it’s flexibility, powerful features, and wide range of extensions available in its marketplace. However, The very useful for the developer is the large number of keywords shortcuts that are available for free to use that significantly enhance productivity of software developer in IT field. Getting used to these shortcuts & mastering it can save your time in building any kind of application, reduce context switching, and keep your focus on your code.
In this article, Let’s explore 47 usefull Visual Studio Code shortcuts tricks that every developer should know. Whether you’re a beginner or an experienced user, these vscode keyboard shortcuts for developers surely help you in various things while coding for your projects.
General Shortcuts
- Command Palette:
Ctrl + Shift + P
orF1
– (Windows) |Cmd + Shift + P
orF1
– (macOS) - Quick Open:
Ctrl + P
– (Windows) |Cmd + P
– (macOS) - New Window:
Ctrl + Shift + N
– (Windows) |Cmd + Shift + N
(macOS) - Close Window:
Ctrl + Shift + W
– (Windows) |Cmd + Shift + W
(macOS) - Settings:
Ctrl + ,
– (Windows) |Cmd + ,
– (macOS) - User Preferences:
Ctrl + Shift + ,
– (Windows) |Cmd + Shift + ,
– (macOS) - Toggle Sidebar:
Ctrl + B
– (Windows)|Cmd + B
– (macOS) - Toggle Full Screen:
F11
– (Windows)|Cmd + Ctrl + F
– (macOS) - Zen Mode:
Ctrl + K Z
– (Windows)|Cmd + K Z
– (macOS) - Toggle Terminal:
Ctrl +
(backtick) – (Windows) |Cmd +
(backtick) – (macOS)
File Management
- New File:
Ctrl + N
|Cmd + N
- Open File:
Ctrl + O
|Cmd + O
- Save:
Ctrl + S
|Cmd + S
- Save As:
Ctrl + Shift + S
|Cmd + Shift + S
- Save All:
Ctrl + K S
|Cmd + Option + S
- Close Editor:
Ctrl + W
|Cmd + W
- Reopen Closed Editor:
Ctrl + Shift + T
|Cmd + Shift + T
- Close Folder:
Ctrl + K F
|Cmd + K F
Navigation
- Go to Line:
Ctrl + G
|Cmd + G
- Go to File:
Ctrl + P
|Cmd + P
- Go to Symbol:
Ctrl + Shift + O
|Cmd + Shift + O
- Go to Definition:
F12
|F12
- Peek Definition:
Alt + F12
|Option + F12
- Navigate Back:
Alt + Left Arrow
|Cmd + Left Arrow
- Navigate Forward:
Alt + Right Arrow
|Cmd + Right Arrow
- Toggle Breadcrumbs:
Ctrl + Shift + .
|Cmd + Shift + .
Editing
- Cut Line:
Ctrl + X
|Cmd + X
- Copy Line:
Ctrl + C
|Cmd + C
- Move Line Up/Down:
Alt + Up/Down Arrow
|Option + Up/Down Arrow
- Duplicate Line:
Shift + Alt + Up/Down Arrow
|Shift + Option + Up/Down Arrow
- Delete Line:
Ctrl + Shift + K
|Cmd + Shift + K
- Insert Line Below:
Ctrl + Enter
|Cmd + Enter
- Insert Line Above:
Ctrl + Shift + Enter
|Cmd + Shift + Enter
- Select Line:
Ctrl + L
|Cmd + L
- Select All Occurrences:
Ctrl + Shift + L
|Cmd + Shift + L
- Undo:
Ctrl + Z
|Cmd + Z
- Redo:
Ctrl + Y
|Cmd + Shift + Z
- Toggle Comment:
Ctrl + /
|Cmd + /
- Block Comment:
Shift + Alt + A
|Shift + Option + A
- Format Document:
Shift + Alt + F
|Shift + Option + F
- Format Selection:
Ctrl + K Ctrl + F
|Cmd + K Cmd + F
Search and Replace
- Find:
Ctrl + F
|Cmd + F
- Replace:
Ctrl + H
|Cmd + H
- Find Next:
F3
|Cmd + G
- Find Previous:
Shift + F3
|Cmd + Shift + G
- Toggle Case Sensitive:
Alt + C
|Cmd + Alt + C
- Toggle Regex:
Alt + R
|Cmd + Alt + R
Simple by using these shortcuts into your workflow will boost your coding speed, As you will be navigate & manipulate your program or code more efficiently, making the development process smoother and more enjoyable. Happy coding!