Most Commonly Used Visual Studio Code (VS Code) Shortcuts
2 min readDec 23, 2022
Here is a list of some of the most commonly used Visual Studio Code (VS Code) shortcuts:
Ctrl + Shift + P
: Open the command palette.Ctrl + P
: Quickly open files by typing their names.Ctrl + Shift + N
: Open a new window.Ctrl + W
: Close the current window.Ctrl + S
: Save the current file.Ctrl + Z
: Undo the last action.Ctrl + Y
: Redo the last action.Ctrl + X
: Cut the selected text.Ctrl + C
: Copy the selected text.Ctrl + V
: Paste the copied text.Ctrl + Shift + V
: Paste the copied text and retain its formatting.Ctrl + F
: Find text within the current file.Ctrl + H
: Replace text within the current file.Ctrl + G
: Go to a specific line number.Ctrl + Shift + F
: Find text within the entire workspace.Ctrl + Tab
: Switch between open files.Ctrl + Shift + Tab
: Reverse the direction of the tab switch.Ctrl + K + S
: Open the keyboard shortcut reference.Ctrl + Shift + O
: Go to a specific symbol in the current file.Ctrl + Shift + M
: Open the problems panel.Ctrl + Shift + E
: Open the explorer panel.Ctrl + Shift + D
: Open the debug panel.Ctrl + Shift + X
: Open the extensions panel.Ctrl + Shift + U
: Open the output panel.Ctrl + B
: Toggle the visibility of the side bar.Ctrl + K + C
: Comment out the selected code.Ctrl + K + U
: Uncomment the selected code.Ctrl + /
: Toggle line comments.Ctrl + K + F
: Format the current file.F12
: Go to the definition of a symbol.Ctrl + .
: Quickly fix errors using the lightbulb menu.Ctrl + Shift + Up/Down
: Move the current line up or down.Ctrl + Shift + [/]
: Collapse or expand the current code block.Ctrl + K + O
: Go to the next or previous symbol.Ctrl + K + I
: Go to the implementation of a symbol.Shift + Alt + F
: Format the selected code.
I hope these shortcuts are helpful for you. Remember that you can always access the complete list of available shortcuts by pressing Ctrl + K + S
. You can also customize the shortcuts to suit your needs by going to "File > Preferences > Keyboard Shortcuts" in the menu.
I hope this helps! Let me know if you have any questions.