loading...
Cover image for What are your favorite VS Code shortcuts?

What are your favorite VS Code shortcuts?

madza profile image Madza ・1 min read

Some of my favorite VS Code shortcuts would be:

Open integrated terminal: Ctrl+`
Toggle comments: Ctrl+/
Quick Open, Go to File: Ctrl+P
Show Command palette: Ctrl+Shift+P or F1
Multiple cursors: Alt+Click

What are your favorites?
Find all the shortcuts here: Windows or MacOS.

Discussion

pic
Editor guide
 

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

 

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)

 

I made thats extension if you are interested.

 

Good one.
But since I avoid to use my mouse, icons have not such an appeal to me.

 

Those bottom left buttons definitely need a keybinding 😁

 

Looks interesting 🤩

 

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

 

Good one, as well 👍

 

Ctrl + K + U : close all saved files
Ctrl + K + W : close all file
Ctrl + K + [: fold everyting inside the current element
Ctrl + K + ] : unfold everything inside the current element
Ctrl + Shit + F10: peek definition (or maybe css) and do changes on the fly

 

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

 

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

 

Find and show symbols in the active file
Ctrl + Shift + O

Similarly works Breadcrumbs
Ctrl + Shift + .

Expand or shrink selection in a closed block of code.
Alt + Shift + Left or Right Arrow

Select all occurences of the word under cursor
Ctrl + Shift + L

 

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

 
 

Cmd+Tab for switching back to WebStrom

 

For basic HTML template !+Enter is my favorite