As we know, Visual Studio Code (VScode) is a popular code editor known for its user-friendly interface and extensive customization options.
One of the most powerful ways to unlock VScode’s potential is through its vast array of keyboard shortcuts.
These shortcuts allow you to navigate your code, perform actions, and edit text with lightning speed, boosting your productivity and workflow significantly.
Vscode is a code editor that has an array of keyboard shortcuts. These Keyboard Shortcuts for VScode can be used to edit text, navigate your code,
Shortcuts for VScode in Windows and Mac 2025
VScode Shortcuts for Windows
Tired of slow mouse clicks? VScode, your coding haven, hides a treasure trove of keyboard shortcuts designed for Windows users. These shortcuts are your ninja tools, allowing you to fly through code, edit text with precision, and navigate your projects like a seasoned pro.
Imagine zipping through lines with Ctrl+X, Ctrl+C, and Ctrl+V, mastering undo magic with Ctrl+Z and Ctrl+Y, or jumping to specific lines with a swift Ctrl+G. No more menu hunting, just pure coding bliss!
But that’s just the tip of the iceberg. You can fold code blocks with Ctrl+Shift+[ and ], comment lines with Ctrl+K, and Ctrl+C, and navigate files with ease using Ctrl+P and Ctrl+Shift+O. Plus, selection becomes a breeze with Ctrl+A and Shift+arrows, letting you manipulate your code with laser focus.
Remember, practice makes perfect! Start with a few key shortcuts, like cutting, copying, and pasting, and gradually expand your repertoire. Soon, you’ll be coding at warp speed, leaving the mouse in the dust. So, embrace the power of VScode’s Windows shortcuts and unlock the full potential of your coding journey!
General Shortcuts
Command for Windows | Action |
---|---|
Ctrl + Shift + P or F1 | Show Command Palette |
Ctrl + P | Quick Open, Go to File… |
Ctrl + Shift + N | New window/instance |
Ctrl + Shift + W | Close window/instance |
Ctrl + , | User Settings |
Ctrl + K or Ctrl + S | Keyboard Shortcuts |
Basic editing Shortcuts
Command for Windows | Action |
---|---|
Ctrl + X | Cut line (empty selection) |
Ctrl + C | Copy line (empty selection) |
Alt + Up/Down Arrow | Move the line up/down |
Shift + Alt + down/up | Copy line up/down |
Ctrl + Shift + K | Delete line |
Ctrl + Enter | Insert line below |
Ctrl + Shift + Enter | Insert line above |
Ctrl + Shift + \ | Jump to the matching bracket |
Ctrl + ]/[ | Indent/outdent line |
Home / End | Go to the beginning /end of the line |
Ctrl + Home | Go to the beginning of a file |
Ctrl + End | Go to the end of the file |
Ctrl + Up/down | Scroll line up/down |
Alt + PgUp / PgDn | Scroll line up/down |
Ctrl + Shift + [ | Fold (Collapse) region |
Ctrl + Shift + ] | Unfold (uncollapse) regions |
Ctrl + K Ctrl + [ | Fold (collapse) all subregions |
Ctrl + K Ctrl + ] | Unfold (uncollapse) all subregions |
Ctrl + K Ctrl + 0 | Fold (collapse) all regions |
Ctrl + K Ctrl + J | Unfold (uncollapse) all regions |
Ctrl + K Ctrl + C | Add line comment |
Ctrl + K Ctrl + U | Remove line comment |
Ctrl + / | Toggle line comment |
Shift + Alt + A | Toggle block comment |
Alt + Z | Toggle word wrap |
Navigation Shortcuts
Command for Windows | Action |
---|---|
Ctrl + T | Show all Symbols |
Ctrl + G | Go to Line… |
Ctrl + P | Go to File…. |
Ctrl + Shift + O | Go to Symbol… |
Ctrl + Shift + M | Show Problems panel |
F8 | Go to the next error or warning |
Shift + F8 | Go to the previous error or warning |
Ctrl + Shift + Tab | Navigate editor group history |
Alt + left/right arrow | Go back / forward |
Ctrl + M | Toggle Tab moves the focus |
Search and replace Shortcuts
Command for Windows | Action |
---|---|
Ctrl + F | Find |
Ctrl + H | Replace |
F3 / Shift + F3 | Find the next/previous |
Alt + Enter | Select all occurrences of Find match |
Ctrl + D | Add selection to next Find match |
Ctrl + K Ctrl + D | Move the last selction to the next Find match |
Alt + C / R / W | Toggle case-sensitive / regex / whole word |
Multi-cursor and selection Shortcuts
Command for Windows | Action |
---|---|
Alt + Click | Insert cursor |
Ctrl + Alt + up/down | Insert cursor above / below |
Ctrl + U | Undo the last cursor operation |
Ctrl + Alt + I | Insert cursor at end of each line selected |
Ctrl + L | Select current line |
Ctrl + Shift + L | Select all occurrences of the current selection |
Ctrl + F2 | Select all occurrences of the current word |
Shift + Alt + right arrow | Expand selection |
Shift + Alt + left arrow | Shrink 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 |
Rich language editing Shortcuts
Command for Windows | Action |
---|---|
Ctrl + Space or Ctrl + I | Trigger suggestion |
Ctrl + Shift + Space | Trigger parameter hints |
Shift + Alt + F | Format document |
Ctrl + K Ctrl + F | Format selection |
F12 | Go to Definition |
Alt + F12 | Peek Definition |
Ctrl + K F12 | Open Definition to the side |
Ctrl + . | Quick Fix |
Shift + F12 | Show References |
F2 | Rename Symbol |
Ctrl + K Ctrl + X | Trim trailing whitespace |
Ctrl + K M | Change file language |
Editor management Shortcuts
Command for Windows | Action |
---|---|
Ctrl + F4 or Ctrl + W | Close editor |
Ctrl + K F | Close folder |
Ctrl + \ | Split editor |
Ctrl + 1 / 2 / 3 | Focus into 1st / 2nd or 3rd editor group |
Ctrl + K Ctrl + left/right arrow | Focus on previous/next editor group |
Ctrl + Shift + PgUp / PgDn | Move editor left/right |
Ctrl + K left / right arrow | Move active editor group |
File management Shortcuts
Command for Windows | Action |
---|---|
Ctrl + N | New File |
Ctrl + O | Open File… |
Ctrl + S | Save |
Ctrl + Shift + S | Save As… |
Ctrl + K S | Save All |
Ctrl + F4 | Close |
Ctrl + K Ctrl + W | Close All |
Ctrl + Shift + T | Reopen closed editor |
Ctrl + K Enter | Keep the preview mode editor open |
Ctrl + Tab | Open next |
Ctrl + Shift + Tab | Open previous |
Ctrl + K P | Copy path of active file |
Ctrl + K R | Reveal active files in Explorer |
Ctrl + K O | Show active file in new window/instance |
Display Shortcuts
Command for Windows | Action |
---|---|
F11 | Toggle fullscreen |
Shift+Alt+0 | Toggle editor layout (horizontal/vertical) |
Ctrl+ = / – | Zoom in/out |
Ctrl+B | Toggle Sidebar Visibility |
Ctrl+Shift+E | Show Explorer / Toggle focus |
Ctrl+Shift+F | Show Search |
Ctrl+Shift+G | Show Source Control |
Ctrl+Shift+D | Show Debug |
Ctrl+Shift+X | Show Extensions |
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 |
Ctrl+K Z | Zen Mode (Esc Esc to exit) |
Debug Shortcuts
Command for Windows | Action |
---|---|
F9 | Toggle breakpoint |
F5 | Start/Continue |
Shift+F5 | Stop |
F11 / Shift+F11 | Step into/out |
F10 | Step over |
Ctrl+K Ctrl+I | Show hover |
Integrated terminal Shortcuts
Command for Windows | Action |
---|---|
Ctrl+` | Show integrated terminal |
Ctrl+Shift+` | Create new terminal |
Ctrl+C | Copy selection |
Ctrl+V | Paste into an active terminal |
Ctrl+ Up/down arrow | Scroll up/down |
Shift+PgUp / PgDn | Scroll the page up/down |
Ctrl+Home / End | Scroll to top/bottom |
VScode Shortcuts for MacOS
Forget clunky mouse clicks and embrace the lightning speed of VScode shortcuts on your Mac. These keyboard combinations are your secret weapons, letting you navigate your code like a seasoned developer and edit text with pinpoint precision.
Imagine effortlessly cutting, copying, and pasting with Cmd+X, Cmd+C, and Cmd+V, undoing mistakes with a flick of your fingers using Cmd+Z and Cmd+Y, or zooming to specific lines with the power of Cmd+G. Ditch the menu maze and experience coding nirvana!
But the magic goes far beyond the basics. Fold code blocks with Cmd+Shift+[ and ], comment lines like a pro with Cmd+K, and Cmd+C, and navigate files with ease using Cmd+P and Cmd+Shift+O. Selecting text becomes a breeze with Cmd+A and Shift+arrows, letting you manipulate your code with laser focus.
Remember, practice makes perfect! Start with a few key shortcuts, like cutting, copying, and pasting, and gradually expand your arsenal. Soon, you’ll be coding at warp speed, leaving the mouse in the dust. So, unlock the power of VScode’s Mac-specific shortcuts and become the master of your coding domain!
General Shortcuts
Command for MacOS | Action |
---|---|
Shift + Command +P, F1 | Show Command Palette |
Command + P | Quick Open, Go to File… |
Shift + Command + N | New window/instance |
Command + W | Close window/instance |
Command + , | User Settings |
Command + K or Command + S | Keyboard Shortcuts |
Basic editing Shortcuts
Command for MacOS | Action |
---|---|
Command + X | Cut line (empty selection) |
Command + C | Copy line (empty selection) |
Option + Down / Up arrow | Move the line down/up |
Shift + Option + Down / Up arrow | Copy line down/up |
Shift + Command + K | Delete line |
Command + Enter / Shift + Command + Enter | Insert the line below/above |
Shift + Command + \ | Jump to the matching bracket |
Command + ] / [ | Indent/outdent line |
Home / End | Go to the beginning/end of the line |
Command + Up/down arrow | Go to the beginning/end of the file |
Ctrl + PgUp / PgDn | Scroll line up/down |
Command + PgUp / PgDn | Scroll the page up/down |
Option + Command + [ / ] | Fold/unfold region |
Command + K Command + [ / ] | Fold/unfold all subregions |
Command + K Command + 0 / Command + J | Fold/unfold all regions |
Command + K Command + C | Add line comment |
Command + K Command + U | Remove line comment |
Command + / | Toggle line comment |
Shift + Option + A | Toggle block comment |
Option + Z | Toggle word wrap |
Multi-cursor and selection Shortcuts
Command for MacOS | Action |
---|---|
Option + click | Insert cursor |
Option + Command + Up arrow | Insert cursor above |
option + Command + Down arrow | Insert cursor below |
Command + U | Undo the last cursor operation |
Shift + Option + I | Insert cursor at end of each line selected |
Command + L | Select current line |
option + Command + L | Select all occurrences of the current selection |
Command + F2 | Select all occurrences of the current word |
Ctrl + Shift + Command + right / left arrow | Expand/shrink selection |
Shift + Option + drag mouse | Column (box) selection |
Shift + Option + Command + Up / down arrow | Column (box) selection up/down |
Shift + Option + Command + left / down arrow | Column (box) selection left/right |
Shift + Option + Command + PgUp | Column (box) selection page up |
Shift + Option + Command + PgDn | Column (box) selection page down |
Search and replace Shortcuts
Command MacOS | Action |
---|---|
Command + F | Find |
Option + Command + F | Replace |
Command + G / Shift + Command + G | Find the next/previous |
Option + Enter | Select all occurrences of Find match |
Command + D | Add selection to next Find match |
Command + K Command + D | Move the last selection to the next Find match |
Rich language editing Shortcuts
Command for MacOS | Action |
---|---|
Ctrl + Space, Command + I | Trigger suggestion |
Option + Command + Space | Trigger parameter hints |
Option + Shift + F | Format document |
Command + K Command + F | Format selection |
F12 | Go to Definition |
Option + F12 | Peek Definition |
Command + K F12 | Open Definition to the side |
Command + . | Quick Fix |
Shift + F12 | Show References |
F2 | Rename Symbol |
Command + K Command + X | Trim trailing whitespace |
Command + K M | Change file language |
Navigation Shortcuts
Command for MacOS | Action |
---|---|
Command + T | Show all Symbols |
Ctrl + G | Go to Line… |
Command + P | Go to File… |
Shift + Command + O | Go to Symbol… |
Shift + Command + M | Show Problems panel |
F8 / Shift + F8 | Go to the next/previous error or warning |
Ctrl + Shift + Tab | Navigate editor group history |
Ctrl + (-) / Ctrl + Shift + (-) | Go back/forward |
Ctrl + Shift + M | Toggle Tab moves the focus |
Editor management Shortcuts
Command for MacOS | Action |
---|---|
Command + W | Close editor |
Command + K F | Close folder |
Command + \ | Split editor |
Command + 1 / 2 / 3 | Focus into 1st, 2nd, 3rd editor group |
Command + K Command + left / right arrow | Focus on the previous/next editor group |
Command + K Shift + Command + left / right arrow | Move editor left/right |
Command + K left / right arrow | Move active editor group |
File management Shortcuts
Command for MacOS | Action |
---|---|
Command + N | New File |
Command + O | Open File… |
Command + S | Save |
Shift + Command + S | Save As… |
Option + Command + S | Save All |
Command + W | Close |
Command + K Command + W | Close All |
Shift + Command + T | Reopen closed editor |
Command + K | Enter Keep preview mode editor open |
Ctrl + Tab / Ctrl + Shift + Tab | Open next/previous |
Command + K P | Copy path of active file |
Command + K R | Reveal active files in Finder |
Command + K O | Show active file in new window/instance |
Display Shortcuts
Command for MacOS | Action |
---|---|
Ctrl + Command + F | Toggle fullscreen |
Option + Command + 0 | Toggle editor layout (horizontal/vertical) |
Command + = / Shift + Command + (-) | Zoom in/out |
Command + B | Toggle Sidebar Visibility |
Shift + Command + E | Show Explorer / Toggle focus |
Shift + Command + F | Show Search |
Ctrl + Shift + G | Show Source Control |
Shift + Command + D | Show Debug |
Shift + Command + X | Show Extensions |
Shift + Command + H | Replace in files |
Shift + Command + J | Toggle Search details |
Shift + Command + U | Show Output panel |
Shift + Command + V | Open Markdown preview |
Command + K V | Open Markdown preview to the side |
Command + K Z | Zen Mode (Esc Esc to exit) |
Debug Shortcuts
Command for MacOS | Action |
---|---|
F9 | Toggle breakpoint |
F5 | Start/Continue |
F11 / Shift + F11 | Step into/ out |
F10 | Step over |
Shift + F5 | Stop |
Command + K Command + I | Show hover |
Integrated terminal Shortcuts
Command for MacOS | Action |
---|---|
Ctrl + ` | Show integrated terminal |
Ctrl + Shift + ` | Create new terminal |
Command + C | Copy selection |
Command + Up/down arrow | Scroll up/down |
PgUp / PgDn | Scroll the page up/down |
Command Home / End | Scroll to top/bottom |
FAQs
Are there shortcuts for specific programming languages?
Many extensions add language-specific shortcuts to VScode. For example, the Python extension might offer shortcuts for common debugging tasks or code completion. Explore the extensions marketplace to find shortcuts tailored to your preferred language.
How can I use keyboard shortcuts for version control operations like commit and push?
You can perform version control operations using keyboard shortcuts. For committing changes, use ‘Ctrl + Enter’ after entering the commit message. To push changes, use ‘Ctrl + Shift + P’ to open the command palette and then type “Git: push” and press Enter. On macOS, replace ‘Ctrl’ with ‘Command’.
Are keyboard shortcuts useful for beginners, or are they more for advanced users?
Keyboard shortcuts are beneficial for both beginners and advanced users of VScode. While beginners might find the initial learning curve steeper, the long-term gains in efficiency and productivity are undeniable.
Can I disable keyboard shortcuts if I find them distracting?
Absolutely! While mastering keyboard shortcuts can significantly boost your coding efficiency, it’s understandable if you find them distracting at times, especially as a beginner. VScode offers several ways to disable specific shortcuts or even all of them, allowing you to find the balance that works best for you.
Can I navigate through search results and errors in my code using keyboard shortcuts?
Yes, you can navigate through search results and errors by using ‘F8’ to move to the next result and ‘Shift + F8’ to move to the previous one. These shortcuts work not only in the search result but also in the problems panel where errors and warnings are listed.
Is there a keyboard shortcut for renaming variables or symbols across the entire project?
Yes, you can rename variables or symbols across the projects using ‘F2’. Place the cursor on the symbol you want to rename, press ‘F2’ to enter the new name and Press Enter. VSCode will automatically update all occurrences throughout the project.
What programming languages does VS Code support?
VS Code supports a diverse set of programming languages out of the box, including but not limited to JavaScript, Python, Java, C++, and many more. Additionally, users can install extensions for additional language support.
Can I customize the appearance and behavior of VS Code?
Yes, VS Code is highly customizable. Users can adjust themes, and keyboard shortcuts, and install extensions to tailor the editor to their preferences. Access customization options through the “File” menu or use keyboard shortcuts.
Conclusion
In the exciting world of coding, Visual Studio Code is like a superhero for developers. It’s not just a tool; it’s a friend that makes coding easier and more fun. With its cool features and friendly design, it’s perfect for both new and experienced coders.
From helping with code suggestions to playing well with different programming languages, VS Code is a coding wizard. As we wrap up our adventure with Visual Studio Code, remember, that it’s not the end; it’s an open invitation to keep exploring and creating.
So, let’s continue our coding journey with VS Code, where every line of code is a step towards making amazing things happen.