Find the complete list of VS Code shortcut keys in one place, enhancing your coding efficiency and workflow.
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
- Introduction
- Importance of VS Code Shortcuts
- Complete list of VS Code shortcut keys in one place
- General Editing
- File Management
- Display
- Search and Replace
- Navigation
- Integrated Terminal
- Code Formatting
- Debugging
- Source Control
- Extensions
- Cursor and Selection
- Multi-Cursor Editing
- Code Folding
- View
- Splitting and Navigation
- Peek and Go To Definition
- Refactoring
- Mark Occurrences
- Workspaces
- Diff Editor
- Miscellaneous
- Conclusion
- Frequently Asked Questions (FAQs)
1. Introduction
Mastering Visual Studio Code shortcut keys can greatly improve your coding efficiency and productivity. This guide provides a complete list of shortcut keys for VS Code, helping you to quickly navigate, edit, and manage your projects. Whether you are a beginner or an experienced developer, these shortcuts will streamline your workflow and make coding easier.
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 Shortcut | Description |
---|---|
General Editing | |
Ctrl + X | Cut line (empty selection) |
Ctrl + C | Copy line (empty selection) |
Ctrl + V | Paste |
Ctrl + Z | Undo |
Ctrl + Shift + Z | Redo |
Alt + Z | Toggle word wrap |
Ctrl + Shift + P or F1 | Show Command Palette |
Ctrl + / | Toggle line comment |
Ctrl + K Ctrl + C | Add line comment |
Ctrl + K Ctrl + U | Remove line comment |
Shift + Alt + A | Toggle block comment |
Ctrl + D | Add selection to next find match |
Ctrl + U | Undo 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 + K | Delete line |
Ctrl + Enter | Insert line below |
Ctrl + Shift + Enter | Insert line above |
Ctrl + Shift + \ | Jump to matching bracket |
Alt + PgUp / PgDn | Scroll page up/down |
Ctrl + ↑ / ↓ | Scroll line up/down |
Ctrl + ] / Ctrl + [ | Indent/outdent line |
Home / End | Go to beginning/end of line |
Ctrl + Home / Ctrl + End | Go to beginning/end of file |
File Management | |
Ctrl + O | Open file |
Ctrl + S | Save file |
Ctrl + Shift + S | Save file as |
Ctrl+K S | Save All |
Ctrl + N | New file |
Ctrl + F4, Ctrl + W | Close editor |
Ctrl + K F | Close editor |
Ctrl + K Ctrl + W | Close All |
Ctrl + K Ctrl + O | Open Folder |
Ctrl + Shift + T | Reopen closed editor |
Ctrl + K Enter | Keep preview mode editor open |
Ctrl + Tab | Switch between open files |
Ctrl + Tab | Open next |
Ctrl + Shift + Tab | Open previous |
Ctrl + P | Quick open file |
Ctrl + R | Go to symbol |
Ctrl + Shift + O | Go to symbol in file |
Ctrl + Shift + N | New window |
Ctrl + Shift + W | Close window |
Ctrl + K, Ctrl + S | Keyboard shortcuts |
Display | |
F11 | Toggle full screen |
Shift + Alt + 0 | Toggle editor layout (horizontal/vertical) |
Ctrl + = / - | Zoom in/out |
Ctrl + Shift + H | Replace in files |
Ctrl + Shift + J | Toggle Search details |
Ctrl + Shift + U | Show Output panel |
Ctrl + Shift + V | Open Markdown preview |
Ctrl + K V | Open Markdown preview to the side |
Search and Replace | |
Ctrl + F | Find |
Ctrl + H | Replace |
F3 / Shift + F3 | Find next/previous |
Alt + Enter | Select all occurrences of current selection |
Ctrl + K Ctrl + D | Move last selection to next Find match |
Ctrl + Shift + F | Search in files |
Ctrl + F2 | Select all occurrences of current word |
Alt + C | Toggle case-sensitive search |
Alt + R | Toggle regex search |
Alt + W | Toggle whole word search |
Navigation | |
Ctrl + G | Go 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, @, file | Go to symbol in file |
Ctrl + P, @, symbol | Go to symbol in workspace |
Ctrl + P, @, symbol @ file | Go to symbol in file in workspace |
Ctrl + Shift + M | Show Problems panel |
F8 | Go to next error or warning |
Shift + F8 | Go to previous error or warning |
Ctrl + Shift + Tab | Navigate editor group history |
Ctrl + M | Toggle 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 + F | Format document |
Ctrl + K, Ctrl + F | Format selection |
Ctrl + Space, Ctrl + I | Trigger suggestion |
Ctrl + Shift + Space | Trigger parameter hints |
Debugging | |
F5 | Start debugging |
Shift + F5 | Stop |
F9 | Toggle breakpoint |
F10 | Step over |
F11 | Step into |
Shift + F11 | Step out |
Ctrl + K, Ctrl + I | Show hover |
Ctrl + K, I | Copy value |
Source Control | |
Ctrl + Shift + G | Open source control |
Ctrl + G | Show git output |
Ctrl + F5 | Stage all changes |
Ctrl + Enter | Commit |
Ctrl + Alt + C | Push |
Ctrl + Alt + P | Pull |
Ctrl + Alt + H | Toggle file blame |
Extensions | |
Ctrl + Shift + X | Extensions view |
Ctrl + Shift + D | Debug view |
Ctrl + Shift + A | Source control view |
Ctrl + Shift + E | Explorer view |
Cursor and Selection | |
Ctrl + L | Select line |
Ctrl + Shift + L | Select all occurrences of current selection |
Ctrl + Shift + Space | Select current line |
Shift + Alt + Right | Expand selection |
Shift + Alt + Left | Shrink selection |
Alt + Click | Add cursor |
Ctrl + U | Soft undo (move cursor back) |
Multi-Cursor Editing | |
Alt + Click | Add cursor |
Ctrl + Alt + Down / Ctrl + Alt + Up | Insert cursor above/below |
Ctrl + U | Undo last cursor operation |
Shift + Alt + I | Insert cursor at end of each line selected |
Ctrl + Shift + L | Select all occurrences of current selection |
Shift + Alt + (drag mouse) | Column (box) selection |
Ctrl + Shift + Alt + (arrow key) | Column (box) selection |
Ctrl + Shift + Alt + PgUp/PgDn | Column (box) selection page up/down |
Code Folding | |
Ctrl + Shift + [ | Fold (collapse) region |
Ctrl + Shift + ] | Unfold (collapse) region |
Ctrl + K, Ctrl + 0 | Fold all |
Ctrl + K, Ctrl + J | Unfold all |
Ctrl + K Ctrl + [ | Fold (collapse) all subregions |
Ctrl + K Ctrl + ] | Unfold (collapse) all subregions |
View | |
Ctrl + ` | Toggle terminal |
Ctrl + B | Toggle sidebar |
Ctrl + J | Toggle panel |
Ctrl + | Toggle panel maximize |
Ctrl + 1 / Ctrl + 2 / Ctrl + 3 | Focus on first, second, or third group in panel |
Splitting and Navigation | |
Ctrl + \ | Split editor |
Ctrl + 1 / Ctrl + 2 / Ctrl + 3 | Focus on first, second, or third editor group |
Ctrl + K, Left / Ctrl + K, Right | Focus on previous/next editor group |
Peek and Go To Definition | |
F12 | Go to definition |
Alt + F12 | Peek definition |
Ctrl + K, F12 | Open definition to the side |
Ctrl + . | Quick Fix |
Shift + F12 | Show References |
Refactoring | |
F2 | Rename symbol |
Ctrl + Shift + I | Select current line |
Mark Occurrences | |
Ctrl + Shift + O | Show all symbols |
Alt + Click | Add cursor |
Ctrl + K, I | Show inline occurrences |
Workspaces | |
Ctrl + K, W | Close workspace |
Ctrl + K, O | Open workspace |
Ctrl + R, Ctrl + R | Reload window |
Ctrl + R, Ctrl + W | Close window |
Diff Editor | |
F7 | Navigate to next change |
Shift + F7 | Navigate to previous change |
Ctrl + K, Ctrl + S | Toggle source control |
Miscellaneous | |
Ctrl + K, Z | Zen mode |
Ctrl + K, W | Close window |
Ctrl + K, R | Reveal active file in Explorer |
Ctrl + K, P | Copy path of active file |
Ctrl + K, Ctrl + X | Trim trailing whitespace |
Ctrl+K M | Change 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!
Thank you for taking the time to read this article! I hope you found it informative and enjoyable. If you did, please consider sharing it with your friends and followers. Your support helps me continue creating content like this.
Stay updated with our latest content by signing up for our email newsletter! Be the first to know about new articles and exciting updates directly in your inbox. Don't miss out—subscribe today!
If you'd like to support my work directly, you can buy me a coffee . Your generosity is greatly appreciated and helps me keep bringing you high-quality articles.
Thanks!
Faraz 😊