Complete List of Visual Studio Code Shortcut Keys in One Place


By Faraz -

Find the complete list of VS Code shortcut keys in one place, enhancing your coding efficiency and workflow.

Complete list of vs code shortcut keys in one place.jpg

Visual Studio Code (VS Code) stands as a powerhouse among code editors, known for its versatility and user-friendly interface. One of its key features contributing to its popularity is the extensive set of shortcut keys designed to streamline various tasks. Let's dive into a comprehensive list of these shortcut keys, organized for easy reference.

Table of Contents

  1. Introduction
  2. Importance of VS Code Shortcuts
  3. Complete list of VS Code shortcut keys in one place
  4. General Editing
  5. File Management
  6. Display
  7. Search and Replace
  8. Navigation
  9. Integrated Terminal
  10. Code Formatting
  11. Debugging
  12. Source Control
  13. Extensions
  14. Cursor and Selection
  15. Multi-Cursor Editing
  16. Code Folding
  17. View
  18. Splitting and Navigation
  19. Peek and Go To Definition
  20. Refactoring
  21. Mark Occurrences
  22. Workspaces
  23. Diff Editor
  24. Miscellaneous
  25. Conclusion
  26. Frequently Asked Questions (FAQs)

1. Introduction

In the fast-paced world of coding, every second counts. That's where the power of shortcut keys comes into play, especially when navigating through the versatile Visual Studio Code (VS Code) editor. In this comprehensive guide, we've meticulously compiled an extensive list of VS Code shortcut keys, ensuring that you can optimize your workflow and boost productivity.

2. Importance of VS Code Shortcuts

Efficiency is the backbone of every coder's success. VS Code shortcuts offer a streamlined way to navigate, edit, and debug code, significantly boosting productivity. As you master these shortcuts, you'll find yourself seamlessly weaving through your code, accomplishing tasks with remarkable speed and precision.

3. Complete list of VS Code shortcut keys in one place

Let's dive into the heart of the matter—the complete list of VS Code shortcut keys. Familiarize yourself with these shortcuts, and witness a transformative shift in your coding workflow.

VS Code ShortcutDescription

General Editing

Ctrl + XCut line (empty selection)
Ctrl + CCopy line (empty selection)
Ctrl + VPaste
Ctrl + ZUndo
Ctrl + Shift + ZRedo
Alt + ZToggle word wrap
Ctrl + Shift + P or F1Show Command Palette
Ctrl + /Toggle line comment
Ctrl + K Ctrl + CAdd line comment
Ctrl + K Ctrl + URemove line comment
Shift + Alt + AToggle block comment
Ctrl + DAdd selection to next find match
Ctrl + UUndo last cursor operation
Ctrl + ,User Settings
Alt + ←Go back
Alt + → Go forward
Alt + ↑Move line up
Alt + ↓Move line down
Shift + Alt + ↑Copy line up
Shift + Alt + ↓Copy line down
Ctrl + Shift + KDelete line
Ctrl + EnterInsert line below
Ctrl + Shift + EnterInsert line above
Ctrl + Shift + \Jump to matching bracket
Alt + PgUp / PgDnScroll page up/down
Ctrl + ↑ / ↓Scroll line up/down
Ctrl + ] / Ctrl + [Indent/outdent line
Home / EndGo to beginning/end of line
Ctrl + Home / Ctrl + EndGo to beginning/end of file

File Management

Ctrl + OOpen file
Ctrl + SSave file
Ctrl + Shift + SSave file as
Ctrl+K SSave All
Ctrl + NNew file
Ctrl + F4, Ctrl + WClose editor
Ctrl + K FClose editor
Ctrl + K Ctrl + WClose All
Ctrl + Shift + TReopen closed editor
Ctrl + K EnterKeep preview mode editor open
Ctrl + TabSwitch between open files
Ctrl + TabOpen next
Ctrl + Shift + TabOpen previous
Ctrl + PQuick open file
Ctrl + RGo to symbol
Ctrl + Shift + OGo to symbol in file
Ctrl + Shift + NNew window
Ctrl + Shift + WClose window
Ctrl + K, Ctrl + SKeyboard shortcuts


F11Toggle full screen
Shift + Alt + 0Toggle editor layout (horizontal/vertical)
Ctrl + = / -Zoom in/out
Ctrl + Shift + HReplace in files
Ctrl + Shift + JToggle Search details
Ctrl + Shift + UShow Output panel
Ctrl + Shift + VOpen Markdown preview
Ctrl + K VOpen Markdown preview to the side

Search and Replace

Ctrl + FFind
Ctrl + HReplace
F3 / Shift + F3Find next/previous
Alt + EnterSelect all occurrences of current selection
Ctrl + K Ctrl + DMove last selection to next Find match
Ctrl + Shift + FSearch in files
Ctrl + F2Select all occurrences of current word
Alt + CToggle case-sensitive search
Alt + RToggle regex search
Alt + WToggle whole word search
Ctrl + GGo to line
Ctrl + P, @Go to symbol in workspace
Ctrl + P, #Go to symbol in workspace by category
Ctrl + P,Go to line in file
Ctrl + P, @, fileGo to symbol in file
Ctrl + P, @, symbolGo to symbol in workspace
Ctrl + P, @, symbol @ fileGo to symbol in file in workspace
Ctrl + Shift + MShow Problems panel
F8Go to next error or warning
Shift + F8Go to previous error or warning
Ctrl + Shift + TabNavigate editor group history
Ctrl + MToggle Tab moves focus

Integrated Terminal

Ctrl + `Toggle terminal
Ctrl + Shift + `Create new terminal
Ctrl + Shift + -Split terminal
Ctrl + Shift + ''Focus into terminal
Ctrl + Shift + Alt + ↑ / Ctrl + Shift + Alt + ↓Copy/paste from/to terminal

Code Formatting

Shift + Alt + FFormat document
Ctrl + K, Ctrl + FFormat selection
Ctrl + Space, Ctrl + ITrigger suggestion
Ctrl + Shift + SpaceTrigger parameter hints


F5Start debugging
Shift + F5Stop
F9Toggle breakpoint
F10Step over
F11Step into
Shift + F11Step out
Ctrl + K, Ctrl + IShow hover
Ctrl + K, ICopy value

Source Control

Ctrl + Shift + GOpen source control
Ctrl + GShow git output
Ctrl + F5Stage all changes
Ctrl + EnterCommit
Ctrl + Alt + CPush
Ctrl + Alt + PPull
Ctrl + Alt + HToggle file blame


Ctrl + Shift + XExtensions view
Ctrl + Shift + DDebug view
Ctrl + Shift + ASource control view
Ctrl + Shift + EExplorer view

Cursor and Selection

Ctrl + LSelect line
Ctrl + Shift + LSelect all occurrences of current selection
Ctrl + Shift + SpaceSelect current line
Shift + Alt + RightExpand selection
Shift + Alt + LeftShrink selection
Alt + ClickAdd cursor
Ctrl + USoft undo (move cursor back)

Multi-Cursor Editing

Alt + ClickAdd cursor
Ctrl + Alt + Down / Ctrl + Alt + UpInsert cursor above/below
Ctrl + UUndo last cursor operation
Shift + Alt + IInsert cursor at end of each line selected
Ctrl + Shift + LSelect all occurrences of current selection
Shift + Alt + (drag mouse)Column (box) selection
Ctrl + Shift + Alt + (arrow key)Column (box) selection
Ctrl + Shift + Alt + PgUp/PgDnColumn (box) selection page up/down

Code Folding

Ctrl + Shift + [Fold (collapse) region
Ctrl + Shift + ]Unfold (collapse) region
Ctrl + K, Ctrl + 0Fold all
Ctrl + K, Ctrl + JUnfold all
Ctrl + K Ctrl + [Fold (collapse) all subregions
Ctrl + K Ctrl + ]Unfold (collapse) all subregions


Ctrl + `Toggle terminal
Ctrl + BToggle sidebar
Ctrl + JToggle panel
Ctrl +Toggle panel maximize
Ctrl + 1 / Ctrl + 2 / Ctrl + 3Focus on first, second, or third group in panel

Splitting and Navigation

Ctrl + \Split editor
Ctrl + 1 / Ctrl + 2 / Ctrl + 3Focus on first, second, or third editor group
Ctrl + K, Left / Ctrl + K, RightFocus on previous/next editor group

Peek and Go To Definition

F12Go to definition
Alt + F12Peek definition
Ctrl + K, F12Open definition to the side
Ctrl + .Quick Fix
Shift + F12Show References


F2Rename symbol
Ctrl + Shift + ISelect current line

Mark Occurrences

Ctrl + Shift + OShow all symbols
Alt + ClickAdd cursor
Ctrl + K, IShow inline occurrences


Ctrl + K, WClose workspace
Ctrl + K, OOpen workspace
Ctrl + R, Ctrl + RReload window
Ctrl + R, Ctrl + WClose window

Diff Editor

F7Navigate to next change
Shift + F7Navigate to previous change
Ctrl + K, Ctrl + SToggle source control


Ctrl + K, ZZen mode
Ctrl + K, WClose window
Ctrl + K, RReveal active file in Explorer
Ctrl + K, PCopy path of active file
Ctrl + K, Ctrl + XTrim trailing whitespace
Ctrl+K MChange file language

You can find more by exploring the documentation or accessing the keyboard shortcuts reference within the editor (Ctrl + K, Ctrl + S).

4. Conclusion

In conclusion, mastering VS Code shortcuts is a key step towards becoming a more efficient and productive developer. By incorporating these shortcuts into your daily workflow, you'll navigate your codebase with finesse and accomplish tasks with unparalleled speed. The power of VS Code is in your hands—seize it with these essential shortcut keys.

Remember, practice makes perfect. Regularly using these shortcuts will ingrain them into your muscle memory, ensuring a seamless and swift coding experience. Elevate your coding game with the power of VS Code shortcuts!

5. Frequently Asked Questions (FAQs)

Q1: What are VS Code shortcuts?

A: VS Code shortcuts are key combinations or sequences that allow users to perform various tasks quickly. They enhance the coding experience by providing efficient ways to navigate, edit, and debug code.

Q2: How can I memorize VS Code shortcuts?

A: Memorizing VS Code shortcuts takes practice and repetition. Start by focusing on a few essential shortcuts, and gradually incorporate more as you become comfortable. Regular use and hands-on coding will reinforce your memory.

Q3: What if I forget a shortcut during coding?

A: No worries! Use VS Code's built-in command palette (Ctrl+Shift+P) to search for and execute the desired command.

Q4: Are there shortcuts for specific languages in VS Code?

A: Yes, VS Code provides language-specific shortcuts to enhance the coding experience for different programming languages. You can explore and customize these shortcuts based on your coding preferences.

Q5: Can I create my own shortcuts in VS Code?

A: Absolutely! VS Code allows users to create custom shortcuts. Navigate to the Keyboard Shortcuts menu, and you can assign personalized key combinations for specific actions, tailoring the editor to your workflow.

Q6: Do shortcuts improve coding speed?

A: Yes, mastering VS Code shortcuts significantly improves coding speed. Once you become proficient in using shortcuts, you'll navigate, edit, and debug code more efficiently, ultimately saving time and boosting productivity.

Q7: How often are VS Code shortcuts updated?

A: VS Code shortcuts are periodically updated to align with the latest features and improvements in the editor. It's advisable to stay informed about updates through official release notes or documentation.

Q8: How do I toggle the visibility of the integrated terminal?

A: Simply press Ctrl + ` to toggle the integrated terminal's visibility.

Q9: What's the shortcut to open a file quickly?

A: Use Ctrl + P to access the Quick Open File feature.

Q10: Can I cut a line of code with a shortcut?

A: Absolutely! Press Ctrl + X to cut the current line.

Q11: How do I add a new occurrence to the selection?

A: Use Ctrl + D to add the next occurrence to the current selection.

Q12: What's the shortcut for toggling line comments?

A: Press Ctrl + / to toggle line comments on or off.

Q13: How can I quickly navigate to a specific line in the code?

A: Use Ctrl + G to go to a specific line in the editor.

Q14: Is there a shortcut for starting debugging?

A: Yes, simply press F5 to start debugging.

Q15: How do I commit changes using shortcut keys?

A: Press Ctrl + Alt + M to commit your changes.

Q16: Can I toggle the visibility of the Git changes panel?

A: Certainly! Use Ctrl + Shift + G to open the Source Control panel.

Q17: What's the shortcut for showing/hiding the terminal?

A: Press Ctrl + ` to show or hide the integrated terminal.

That’s a wrap!

I hope you enjoyed this article

Did you like it? Let me know in the comments below 🔥 and you can support me by buying me a coffee.

And don’t forget to sign up to our email newsletter so you can get useful content like this sent right to your inbox!

Faraz 😊

End of the article

Subscribe to my Newsletter

Get the latest posts delivered right to your inbox

Related Post