VSCode Keyboard Shortcuts: The Complete Reference Guide for Windows, Mac, and Linux
Visual Studio Code (VSCode) is the most popular code editor in the world, used by over 70% of professional developers according to the Stack Overflow 2025 Developer Survey. Its power comes not just from its extension ecosystem, but from the depth of its built-in keyboard shortcuts.
Knowing the right shortcuts transforms your editing speed. Instead of reaching for the mouse to click a file, open a search panel, or toggle a sidebar, you keep your hands on the keyboard and your brain in the code. The difference between a developer who knows ten shortcuts and one who knows fifty is not just speed — it is flow. Fewer interruptions mean deeper focus, fewer context switches, and less cognitive overhead.
This guide covers the most important VSCode keyboard shortcuts organized by category. Use it as a reference to learn new shortcuts or as a cheat sheet to keep on your desk. For a fully searchable, interactive version with platform toggling (Windows, Linux, and macOS), use the VSCode Keyboard Shortcuts reference tool on AIBox.
The 10 Most Essential VSCode Shortcuts
If you learn only ten shortcuts from this guide, start with these. They cover the most frequent actions in a developer’s daily workflow — opening files, navigating between tabs, searching code, and editing text efficiently.
| Action | Windows / Linux | macOS | Why It Matters |
|---|---|---|---|
| Quick Open (Go to File) | Ctrl+P | Cmd+P | Open any file by name without touching the sidebar |
| Command Palette | Ctrl+Shift+P | Cmd+Shift+P | Access every VSCode command from the keyboard |
| Go to Definition | F12 | F12 | Jump directly to where a function or variable is defined |
| Find in File | Ctrl+F | Cmd+F | Search within the current file with live highlighting |
| Find in Project | Ctrl+Shift+F | Cmd+Shift+F | Search across all files in the workspace |
| Toggle Sidebar | Ctrl+B | Cmd+B | Hide or show the sidebar for more code space |
| Split Editor | Ctrl+\ | Cmd+\ | Open the current file in a side-by-side editor |
| Select Current Line | Ctrl+L | Cmd+L | Select the entire line the cursor is on |
| Move Line Up/Down | Alt+↑/↓ | Option+↑/↓ | Rearrange lines without cut-and-paste |
| Multi-Cursor | Alt+Click | Option+Click | Edit multiple locations at once |
Master these ten, and you will save dozens of mouse-to-sidebar trips every day. The single highest-impact shortcut is Ctrl+P / Cmd+P (Quick Open), which replaces the entire file exploration workflow. Instead of clicking through folders in the explorer, you type the file name and press Enter.
Editing Shortcuts: Write Code Faster
Editing shortcuts handle the actions you perform hundreds of times per day: selecting text, moving lines, adding cursors, and toggling comments. These are the shortcuts that make the difference between editing code character-by-character and manipulating it block-by-block.
Selection and Line Manipulation
| Action | Windows / Linux | macOS |
|---|---|---|
| Select current line | Ctrl+L | Cmd+L |
| Expand selection | Ctrl+Shift+→ | Cmd+Shift+→ |
| Shrink selection | Ctrl+Shift+← | Cmd+Shift+← |
| Copy line up/down | Shift+Alt+↑/↓ | Shift+Option+↑/↓ |
| Move line up/down | Alt+↑/↓ | Option+↑/↓ |
| Duplicate selection | Ctrl+D (hold to chain) | Cmd+D |
| Delete line | Ctrl+Shift+K | Cmd+Shift+K |
| Indent / Outdent | Ctrl+] / Ctrl+[ | Cmd+] / Cmd+[ |
| Toggle comment (single line) | Ctrl+/ | Cmd+/ |
| Toggle comment (block) | Shift+Alt+A | Shift+Option+A |
| Join current line with next | Ctrl+J (text context) | Cmd+J (text context) |
Multi-Cursor and Column Selection
Multi-cursor editing is one of VSCode’s superpowers. It lets you edit multiple locations simultaneously — renaming a variable that appears 20 times, adding a prefix to every line in a list, or changing a property name across an entire object.
| Action | Windows / Linux | macOS |
|---|---|---|
| Add cursor at clicked location | Alt+Click | Option+Click |
| Add cursor above / below | Ctrl+Alt+↑/↓ | Cmd+Option+↑/↓ |
| Add cursor at end of each selected line | Shift+Alt+I | Shift+Option+I |
| Select all occurrences of current selection | Ctrl+Shift+L | Cmd+Shift+L |
| Select next occurrence of current selection | Ctrl+D | Cmd+D |
| Toggle column selection mode | Ctrl+Shift+Alt (hold) | Cmd+Shift+Option (hold) |
The most practical multi-cursor technique is selecting a word with Ctrl+D (or Cmd+D), then pressing it repeatedly to select each subsequent occurrence. Each press adds a cursor at the next match, and typing replaces all occurrences simultaneously.
Navigation and Search Shortcuts: Move Through Code Quickly
Navigation shortcuts eliminate the time spent scrolling, clicking tabs, and hunting through folders. They let you jump to any file, symbol, line, or reference in seconds.
File and Tab Navigation
| Action | Windows / Linux | macOS |
|---|---|---|
| Quick Open (Go to File) | Ctrl+P | Cmd+P |
| Switch to recent file | Ctrl+Tab (hold to cycle) | Cmd+Tab (hold to cycle) |
| Go to line | Ctrl+G (after Ctrl+P) | Ctrl+G (after Cmd+P) |
| Go to symbol in file | Ctrl+Shift+O | Cmd+Shift+O |
| Go to symbol in workspace | Ctrl+T | Cmd+T |
| Navigate back | Ctrl+Alt+- | Cmd+Option+- |
| Navigate forward | Ctrl+Shift+- | Cmd+Shift+- |
| Switch between editor tabs | Ctrl+Tab | Ctrl+Tab |
| Go to previous editor | Ctrl+Shift+Tab | Cmd+Shift+Tab |
| Close current editor | Ctrl+W | Cmd+W |
| Reopen closed editor | Ctrl+Shift+T | Cmd+Shift+T |
Code Navigation and References
| Action | Windows / Linux | macOS |
|---|---|---|
| Go to Definition | F12 | F12 |
| Peek Definition | Alt+F12 | Option+F12 |
| Go to References | Shift+F12 | Shift+F12 |
| Go to Type Definition | Ctrl+Shift+ (backtick) | Cmd+Shift+ (backtick) |
| Go to Implementation | Ctrl+F12 | Cmd+F12 |
| Find All References | Shift+Alt+F12 | Shift+Option+F12 |
| Rename Symbol | F2 | F2 |
The Go to Definition (F12) and Peek Definition (Alt+F12) pair form a powerful navigation workflow. Use F12 to jump to a definition when you want to understand the implementation in detail. Use Alt+F12 when you want to see the definition inline without leaving your current context. Combined with Ctrl+Alt+- (Navigate Back), you can explore code deeply and return to where you started in seconds.
Search Across the Workspace
| Action | Windows / Linux | macOS |
|---|---|---|
| Find in File | Ctrl+F | Cmd+F |
| Replace in File | Ctrl+H | Cmd+H |
| Find in Files (project-wide) | Ctrl+Shift+F | Cmd+Shift+F |
| Replace in Files (project-wide) | Ctrl+Shift+H | Cmd+Shift+H |
| Toggle Search Details | Ctrl+Shift+J | Cmd+Shift+J |
| Toggle Regex in Search | Alt+R | Cmd+Option+R |
| Toggle Case Sensitivity | Alt+C | Cmd+Option+C |
| Toggle Whole Word | Alt+W | Cmd+Option+W |
Project-wide search (Ctrl+Shift+F / Cmd+Shift+F) is one of the most used developer tools regardless of editor choice. When you need to find every API endpoint that uses a specific pattern, or verify that a deprecated function is not called anywhere in the codebase, this is the command to reach for. Toggle regex mode with Alt+R to run complex pattern searches across your entire project.
Debugging Shortcuts: Step Through Code Efficiently
Debugging workflows are where keyboard shortcuts deliver the most dramatic speed improvements. Each time you reach for the mouse to click “Continue” or “Step Over,” you break your concentration. Keyboard-controlled debugging keeps your attention on the code.
| Action | Windows / Linux | macOS |
|---|---|---|
| Start / Continue Debugging | F5 | F5 |
| Stop Debugging | Shift+F5 | Shift+F5 |
| Restart Debugging | Ctrl+Shift+F5 | Cmd+Shift+F5 |
| Step Over | F10 | F10 |
| Step Into | F11 | F11 |
| Step Out | Shift+F11 | Shift+F11 |
| Toggle Breakpoint | F9 | F9 |
| Enable/Disable Breakpoint | Ctrl+F9 | Cmd+F9 |
| Conditional Breakpoint… | Ctrl+Shift+F9 (right-click also) | Cmd+Shift+F9 |
| Toggle Debug Console | Ctrl+Shift+Y | Cmd+Shift+Y |
| Evaluate in Debug Console | Ctrl+Shift+Enter (with console focused) | Cmd+Shift+Enter |
The debugger shortcuts follow a logical progression based on what you need to do. Start with F9 to set a breakpoint, press F5 to launch the debugger, then use F10 to step over lines of code, F11 to step into function calls, and Shift+F11 to step out and return to the caller. This four-key sequence handles 90% of debugging workflows.
Integrated Terminal Shortcuts
VSCode’s integrated terminal is one of its most used features. It eliminates the need to alt-tab to a separate terminal window, but only if you can open, close, and manage it from the keyboard.
| Action | Windows / Linux | macOS |
|---|---|---|
| Toggle Integrated Terminal | Ctrl+` | Ctrl+` |
| Create New Terminal | Ctrl+Shift+ | Cmd+Shift+ |
| Focus Previous Terminal | Ctrl+Shift+[ | Cmd+Shift+[ |
| Focus Next Terminal | Ctrl+Shift+] | Cmd+Shift+] |
| Clear Terminal | Ctrl+K (terminal focused) | Cmd+K (terminal focused) |
| Scroll Up / Down | PageUp / PageDown | PageUp / PageDown |
| Go to Terminal Tab | Alt+[number] (1-9) | Cmd+[number] (1-9) |
| Kill Active Terminal | Ctrl+Shift+K (terminal focused) | Cmd+Shift+K (terminal focused) |
The most important terminal shortcut is Ctrl+` (backtick) — toggle the terminal panel open and closed. When you pair this with Ctrl+P to open files, you can navigate between code and terminal without ever touching the mouse. For developers running build commands, git operations, or package manager tasks alongside their code, this single shortcut eliminates a significant source of friction. Use the VSCode terminal in combination with client-side developer tools like the Case Converter for renaming variables or the Markdown Preview for checking documentation formatting without leaving the editor.
Editor and View Management Shortcuts
These shortcuts control the editor layout, panels, and view elements. They help you set up your workspace exactly how you want it — split editors, toggle panels, and switch views — all without touching the sidebar or menu bar.
| Action | Windows / Linux | macOS |
|---|---|---|
| Toggle Sidebar | Ctrl+B | Cmd+B |
| Toggle Activity Bar | Ctrl+Shift+B | Cmd+Shift+B |
| Toggle Status Bar | Ctrl+Shift+ (backtick) in some themes | Cmd+Shift+ |
| Toggle Panel (Terminal/Problems/Output) | Ctrl+J | Cmd+J |
| Maximize Editor / Minimize Panel | Ctrl+` then toggle panel | same |
| Split Editor | Ctrl+\ | Cmd+\ |
| Split Editor Vertically | Alt+Shift+1 (via layout commands) | Option+Shift+1 |
| Split Editor Horizontally | Alt+Shift+2 (via layout commands) | Option+Shift+2 |
| Zoom In / Out | Ctrl+= / Ctrl+- | Cmd+= / Cmd+- |
| Toggle Full Screen | F11 | Ctrl+Cmd+F |
| Zen Mode | Ctrl+K Z | Cmd+K Z |
Zen Mode (Ctrl+K Z on both platforms) is worth special mention. It hides all panels, sidebars, and tabs, leaving only the editor. This is ideal for deep focus sessions where distractions need to disappear. Press Esc twice to exit Zen Mode when you are done.
How to Use the AIBox VSCode Shortcuts Reference Tool
The VSCode Keyboard Shortcuts reference tool on AIBox provides a fully interactive version of this guide. Unlike a static cheat sheet, it lets you:
- Toggle between platforms: Switch between Windows/Linux and macOS shortcuts with one click. The macOS column shows
CmdandOptionkey equivalents for every shortcut. - Filter by category: Browse shortcuts by editing, navigation, debugging, terminal, and more. Each category groups related shortcuts so you can focus on learning one area at a time.
- Search by action or key: Type what you want to do (e.g., “delete line” or “rename”) or a key combination (e.g., “Ctrl+Shift+K”) to find the exact shortcut instantly.
- Discover new shortcuts: Browse the full list of over 120 shortcuts to find ones you did not know existed. Many developers discover their most-used shortcuts months or years after starting with VSCode.
The tool runs entirely in your browser — no data is sent to any server, and no account is required. It is designed to stay open in a pinned tab while you code, ready for quick reference whenever you need it.
How to Customize Your Own Keyboard Shortcuts
VSCode’s default keybindings cover a comprehensive range of actions, but every developer has their own preferences. You can customize any shortcut through the Keyboard Shortcuts editor.
- Open the Keyboard Shortcuts editor:
Ctrl+K Ctrl+S(Cmd+K Cmd+Son Mac) - Search for any command by name or current keybinding
- Click the pencil icon next to a command to assign a new keybinding
- Press the desired key combination and press Enter
- If there is a conflict, VSCode shows a warning so you can resolve it
For advanced customization, you can edit the keybindings.json file directly. Click the “Open Keyboard Shortcuts (JSON)” icon in the top-right corner of the Keyboard Shortcuts editor. This file supports advanced features like when clause contexts that restrict shortcuts to specific conditions (e.g., only when the editor has focus, only when debugging is active, or only in markdown files).
Common customizations include:
- Switching to Vim-style navigation: Install the Vim extension and configure custom bindings that blend Vim insert mode with VSCode commands
- Reassigning Ctrl+W: Many developers change “Close Editor” to a less frequently used key to avoid accidentally closing files
- Adding extension shortcuts: Extensions frequently add new commands that benefit from custom keybindings — the Prettier formatter, GitLens, and Markdown Preview Enhanced all have useful commands worth binding
- Creating macros: Using the “Multi Command” extension, you can chain multiple actions into a single shortcut — for example, formatting a document and saving it with one key press
Conclusion
Keyboard shortcuts are the single highest-ROI skill improvement for developers. Each shortcut you learn saves a few seconds dozens or hundreds of times per day, which adds up to hours per week of reclaimed time. Over a year, learning fifty shortcuts can recover days of productivity that would otherwise be spent on repetitive mouse movements.
The key to learning shortcuts is not memorizing all of them at once. Pick five from this guide that you do not already know — the ones that address a frustration point in your current workflow. Practice them consciously for a week. They become muscle memory quickly, usually within two to three days of regular use. Once those five are automatic, add five more.
Bookmark the VSCode Keyboard Shortcuts reference tool to explore the full list of over 120 shortcuts in an interactive, searchable format. For related developer productivity resources, use the Diff Checker to compare code changes side by side, the Regex Tester to build and test search patterns, and the AI Prompt Library to find effective prompts for ChatGPT and Claude. Each tool in the AIBox developer suite runs entirely in your browser, respects your privacy, and requires no account or subscription.