DEV Community

Cover image for What are your favorite VS Code shortcuts?

What are your favorite VS Code shortcuts?

Madza on September 25, 2020

Some of my favorite VS Code shortcuts would be: Open integrated terminal: Ctrl+` Toggle comments: Ctrl+/ Quick Open, Go to File: Ctrl+P Show Comma...
Collapse
 
jwp profile image
John Peters • Edited

Ctrl+Shift+K Every day!

Delete Line Ctrl+Shift+K editor.action.deleteLines

Other favorites

Add Line Comment Ctrl+K Ctrl+C editor.action.addCommentLine
Remove Line Comment Ctrl+K Ctrl+U editor.action.removeCommentLine
Undo Ctrl+Z undo
Redo Ctrl+Y redo
Find Ctrl+F actions.find
Go Back Alt+Left workbench.action.navigateBack
Go Forward Alt+Right workbench.action.navigateForward

Memorizing

Show All Symbols Ctrl+T workbench.action.showAllSymbols
Toggle Zen Mode Ctrl+K Z workbench.action.toggleZenMode
Toggle Sidebar Visibility Ctrl+B workbench.action.toggleSidebarVisibility
Toggle Integrated Terminal Ctrl+` workbench.action.terminal.toggleTerminal
Focus Next Search Result F4 search.action.focusNextSearchResult

Collapse
 
robertotonino profile image
Roberto Tonino • Edited

I recently discovered the "fold" and "unfold" commands that allow you to open/close groups of parenthesis. Before I had to go next to the line numbers and toggle the groups with the mouse.

Command IDs:

"editor.fold"
"editor.unfold"

I bound them with CTRL + SHIFT + ' (for fold) and CTRL + SHIFT + ì (for unfold)

Collapse
 
benjioe profile image
Benjioe

I made thats extension if you are interested.

Collapse
 
robertotonino profile image
Roberto Tonino • Edited

Those bottom left buttons definitely need a keybinding 😁

Collapse
 
madza profile image
Madza

Looks interesting 🤩

Collapse
 
itsjzt profile image
Saurabh Sharma

Alt+shift+i it adds a cursor on every selected line.

Collapse
 
madza profile image
Madza

Good one, as well 👍

Collapse
 
scroung720 profile image
scroung720 • Edited

The answers of this post are pure gold.

My two cents:
Focus editor - CTRL + 1
Split terminal - CTRL + SHIFT + 5
Zen mode - CTRL + k z
Explore files - CTRL + SHIFT + E
Toggle left sidebar - CTRL + B
Find identifier references: F12

Collapse
 
jozalex profile image
Alex Jose

Ctrl+G : line number search
This helps me lot while debugging

Collapse
 
joelbonetr profile image
JoelBonetR 🥇

I just installed a plugin to get the same key bindings than jetbrains IDEs 😆

Collapse
 
oguimbal profile image
Olivier Guimbal

The ones I described here 😏

Collapse
 
moshe profile image
Moshe Zada

Cmd+Tab for switching back to WebStrom

Collapse
 
aakriti_sharma profile image
Aakriti Sharma

For basic HTML template !+Enter is my favorite