VS Code Shortcut Keys (Complete List)
Read on to explore vs code shortcut keys (complete list) — a beginner-friendly walkthrough by Codekilla.
Visual Studio Code (VS Code) is a lightweight, powerful code editor developed by Microsoft. It's free, open-source, and supports virtually every programming language through extensions. While you can accomplish everything by clicking through menus, keyboard shortcuts transform VS Code from a simple text editor into a speed demon that keeps your hands on the keyboard and your workflow uninterrupted.
Think of shortcuts as the difference between typing and hunt-and-peck. Sure, both get words on screen, but one makes you 10x faster. The same principle applies here—mastering even a dozen shortcuts will dramatically increase your coding speed and reduce mental friction when switching between tasks.
- Speed: Navigate files, edit code, and debug without breaking focus to grab your mouse every 5 seconds
- Flow State: Staying on the keyboard helps you maintain deep concentration during complex problem-solving
- Professionalism: Senior developers use shortcuts instinctively—learning them signals you're serious about your craft
- Reduced Strain: Minimizing mouse movement prevents repetitive strain injuries over long coding sessions
- Productivity Multiplier: A 2-second action done 100 times daily saves 3+ minutes—that's hours per week
These are your bread-and-butter commands for daily file management and basic editing. You'll use these dozens of times per session.
| Action | Windows/Linux | Mac |
|---|---|---|
| Command Palette | Ctrl+Shift+P | Cmd+Shift+P |
| Quick Open File | Ctrl+P | Cmd+P |
| New Window | Ctrl+Shift+N | Cmd+Shift+N |
| Close Window | Ctrl+W | Cmd+W |
| Settings | Ctrl+, | Cmd+, |
| Toggle Sidebar | Ctrl+B | Cmd+B |
The Command Palette (Ctrl+Shift+P) is your superpower. It gives you access to every VS Code command through fuzzy search. If you forget a shortcut, just open the palette and type what you want.
javascript// Use Ctrl+P to quickly jump to this file by typing "user-service" class UserService { constructor(database) { this.db = database; } async findUser(id) { return await this.db.users.findById(id); } }
Moving around your codebase efficiently separates beginners from experienced developers. These shortcuts let you jump between files, lines, and symbols without scrolling or searching.
| Action | Windows/Linux | Mac |
|---|---|---|
| Go to Line | Ctrl+G | Cmd+G |
| Go to Symbol | Ctrl+Shift+O | Cmd+Shift+O |
| Go to Definition | F12 | F12 |
| Peek Definition | Alt+F12 | Option+F12 |
| Go Back | Alt+Left | Ctrl+- |
| Go Forward | Alt+Right | Ctrl+Shift+- |
| Navigate Editor Groups | Ctrl+1/2/3 | Cmd+1/2/3 |
Go to Symbol (Ctrl+Shift+O) is criminally underused. In a 500-line file, typing @render instantly jumps to your render function instead of scrolling blindly.
python# Press Ctrl+Shift+O and type "calculate" to jump here instantly def calculate_discount(price, percentage): discount = price * (percentage / 100) return price - discount def calculate_tax(subtotal, rate): return subtotal * rate def calculate_total(items): return sum(item['price'] for item in items)
These commands manipulate text and code structure. Mastering multi-cursor editing alone will make you feel like a wizard.
| Action | Windows/Linux | Mac |
|---|---|---|
| Copy Line Down | Shift+Alt+Down | Shift+Option+Down |
| Move Line Up/Down | Alt+Up/Down | Option+Up/Down |
| Delete Line | Ctrl+Shift+K | Cmd+Shift+K |
| Add Cursor Above/Below | Ctrl+Alt+Up/Down | Cmd+Option+Up/Down |
| Select All Occurrences | Ctrl+Shift+L | Cmd+Shift+L |
| Add Selection to Next Find | Ctrl+D | Cmd+D |
| Toggle Comment | Ctrl+/ | Cmd+/ |
| Block Comment | Shift+Alt+A | Shift+Option+A |
Multi-cursor editing (Ctrl+D to select next occurrence) is a game-changer. Need to rename a variable in 8 places? Select it, hit Ctrl+D seven times, and type the new name once.
css/* Select "primary" and press Ctrl+D repeatedly, then type "accent" */ .button-primary { background: #007bff; } .border-primary { border-color: #007bff; } .text-primary { color: #007bff; } .hover-primary:hover { background: #0056b3; }
Finding and replacing text across files is essential when refactoring. These shortcuts make it painless.
| Action | Windows/Linux | Mac |
|---|---|---|
| Find | Ctrl+F | Cmd+F |
| Replace | Ctrl+H | Cmd+H |
| Find in Files | Ctrl+Shift+F | Cmd+Shift+F |
| Replace in Files | Ctrl+Shift+H | Cmd+Shift+H |
| Next/Previous Match | F3 / Shift+F3 | Cmd+G / Cmd+Shift+G |
Find in Files (Ctrl+Shift+F) searches your entire project. When combined with regex, you can find every instance of a pattern across hundreds of files in seconds.
regex// Use Ctrl+Shift+F with this regex to find all console.log statements console\.log\([^)]+\) // Example matches: console.log("User logged in"); console.log({ userId: 123, action: 'click' });
Split editors, toggle panels, and manage your workspace layout for maximum screen real estate.
| Action | Windows/Linux | Mac |
|---|---|---|
| Split Editor | Ctrl+\ | Cmd+\ |
| Toggle Terminal | Ctrl+ ` | Ctrl+ ` |
| Zen Mode | Ctrl+K Z | Cmd+K Z |
| Fullscreen | F11 | Ctrl+Cmd+F |
| Zoom In/Out | Ctrl+=/− | Cmd+=/− |
| Show Explorer | Ctrl+Shift+E | Cmd+Shift+E |
| Show Search | Ctrl+Shift+F | Cmd+Shift+F |
| Show Source Control | Ctrl+Shift+G | Cmd+Shift+G |
Splitting editors (Ctrl+\) lets you view two files side-by-side—perfect for comparing implementations or writing tests alongside production code.
typescript// File 1: userController.ts (left split) export class UserController { createUser(data: UserDTO) { return this.service.create(data); } } // File 2: userController.test.ts (right split) describe('UserController', () => { it('should create user', () => { const result = controller.createUser({ name: 'Alice' }); expect(result).toBeDefined(); }); });
Debug mode without these shortcuts means constant mouse clicking. Learn these five and you'll debug 3x faster.
| Action | Windows/Linux | Mac |
|---|---|---|
| Toggle Breakpoint | F9 | F9 |
| Start/Continue | F5 | F5 |
| Step Over | F10 | F10 |
| Step Into | F11 | F11 |
| Step Out | Shift+F11 | Shift+F11 |
| Stop Debugging | Shift+F5 | Shift+F5 |
javapublic int calculateSum(List<Integer> numbers) { int sum = 0; // Set breakpoint here with F9 for (int num : numbers) { sum += num; // Press F10 to step over each iteration } return sum; // Press F5 to continue to here }
| Need | Reach For |
|---|---|
| Open any file fast | Ctrl+P |
| Run any command | Ctrl+Shift+P |
| Jump to line 247 | Ctrl+G then type 247 |
| Rename variable everywhere | F2 |
| Multiple cursors | Ctrl+D or Alt+Click |
| Comment/uncomment code | Ctrl+/ |
| Split screen | Ctrl+\ |
| Open terminal | Ctrl+ ` |
| Format document | Shift+Alt+F |
| Delete entire line | Ctrl+Shift+K |
-
Memorizing everything at once: Start with 5-10 shortcuts you use most. Add one new shortcut per week instead of trying to learn 50 in a day.
-
Using the mouse out of habit: Your muscle memory wants the mouse. Force yourself to use shortcuts for one week—it'll feel slow at first, then magical.
-
Ignoring the Command Palette: If you can't remember a shortcut,
Ctrl+Shift+Pshows the keyboard binding next to every command. It's a built-in cheat sheet. -
Not customizing keybindings: Your workflow is unique. Open Keyboard Shortcuts (
Ctrl+K Ctrl+S) and remap anything that feels awkward. -
Skipping multi-cursor editing: This feature alone saves hours per month. If you're still editing repetitive text one-by-one, you're working 10x harder than necessary.
-
Forgetting platform differences: Mac uses
Cmdwhere Windows usesCtrl. If a shortcut "doesn't work," you might be using the wrong modifier key.
💡 Think Like a Programmer: Your keyboard is your primary interface with the computer—mastering shortcuts isn't about showing off, it's about removing friction between your thoughts and the code. Every second saved on navigation is a second you can spend solving actual problems.
Keep Reading
Master CSS Emmet Shortcuts in VS Code
Read on to explore master css emmet shortcuts in vs code — a beginner-friendly walkthrough by Codekilla.
VS Code Emmet Shortcuts for HTML With Examples
Read on to explore vs code emmet shortcuts for html with examples — a beginner-friendly walkthrough by Codekilla.
C & C++ Setup in VS Code (Step-by-Step with MinGW)
Configure VS Code for C/C++ development with MinGW compiler and debugging ready to go.
