Visual Studio Code Keyboard Shortcuts collection

This is a collection of vscode keyboard shortcuts. This page is updated regularly.

To search all available shortcuts and Options

Ctrl + Shift + P or, use the F1 key

File editing keyboard shortcuts for vscode

Add comments to multiple lines

Select the lines you wanted to comment, then

Ctrl + /

To copy a line to the next line (or to the line above)

Ctrl + Alt + Down or Ctrl + Alt + Up

How to move the line up or down?

Alt + Up or Alt + Down

Move a line(s) to right (increase indentation)

Ctrl + ]

Move a line(s) to left (decrease indentation)

Ctrl + [

Delete a line without selecting the whole line

Shift + Del

Save all open file changes

Ctrl + K then S

To compare active file with Clipboard

Ctrl + K then C

UI or interface quick access keyboard shorcuts

To Show or hide the sidebar (file explorer)

Ctrl + B

To collapse all collapsable items in a page (fold all)

Ctrl + K then Ctrl + 0

To uncollapse all collapsed items in a page (unfold all)

Ctrl + K then Ctrl + J

Advanced keyboard shortcuts for vscode

How to open settings.json?

Press F1, then Type Open Settings, then select Open Default Settings (JSON)