VS Code: Shortcuts and Habits That Actually Matter
The handful of VS Code shortcuts and habits worth learning — Command Palette, multi-cursor, fuzzy file and symbol search, the integrated terminal, source control, and settings worth changing.
What you'll learn
- ✓The Command Palette as the single shortcut that unlocks everything
- ✓Multi-cursor editing — three flavours, each worth the muscle memory
- ✓Fast file, symbol, and project-wide search
- ✓The integrated terminal and the source-control panel
- ✓A short list of settings worth changing on day one
- ✓A short list of extensions worth installing — and a longer one to skip
Prerequisites
- •A working VS Code install (or any fork like Cursor or VSCodium)
VS Code does a thousand things. You only need to be fluent in about a dozen. This post is the short list — the shortcuts I’d teach a new engineer on day one, the settings worth toggling, and the extensions worth installing. Everything else can wait until you need it.
Shortcuts below show macOS / Windows + Linux. Most cross-platform differences are just Cmd ↔ Ctrl.
The Command Palette
If you remember nothing else from this post, remember this one shortcut.
Cmd+Shift+P / Ctrl+Shift+P opens the Command Palette. Every command VS Code can run, every extension command, every setting toggle is reachable from there by fuzzy search.
> format document
> toggle word wrap
> git: stage all changes
> python: select interpreter
The Command Palette means you never need to memorise more than one shortcut. Type a few letters of what you want and hit Enter. Over time you’ll learn the keybindings for the commands you use daily — but you’ll learn them by reading them off the Command Palette, not by drilling.
File search: Cmd+P
Cmd+P / Ctrl+P is fuzzy file search across the workspace. Type any subset of the filename and VS Code finds it.
hipro → src/hooks/useProfile.ts
authmid → server/middleware/auth.ts
You almost never need to navigate the file tree by hand. Internalise Cmd+P and the sidebar becomes optional.
A few variations from the same input:
- Cmd+P then
@— jump to a symbol in the current file. - Cmd+P then
#— search symbols across the workspace. - Cmd+P then
:42— jump to line 42. - Cmd+P then
>— same as Cmd+Shift+P.
That last one is why Cmd+P is the only entry point you really need.
Multi-cursor
The feature that converts skeptics into fans. Three ways to invoke it.
1. Click with Alt / Option held. Drops a cursor wherever you click. Hold Cmd+Option / Ctrl+Alt and arrow keys to add a cursor on the line above or below.
2. Cmd+D / Ctrl+D. Select the next occurrence of the current word. Hit it repeatedly to add cursors at each match. Press Cmd+K Cmd+D to skip a match.
// Cursor on "name", press Cmd+D three times:
const name = user.name; // ↑
function greet(name) { // ↑
return `Hello, ${name}`; // ↑
}
// Now type once, edit three places.
3. Cmd+Shift+L / Ctrl+Shift+L. Select all occurrences of the current word in the file. Useful for renaming a local variable when LSP rename isn’t available.
For symbol renames across files, prefer F2 (Rename Symbol) — it uses the language server and respects scope. Multi-cursor is for textual edits; F2 is for semantic edits.
Symbol and project search
Cmd+Shift+O / Ctrl+Shift+O opens the current file’s symbol list. Type a function name; jump there.
Cmd+Shift+F / Ctrl+Shift+F opens project-wide find. The pane in the sidebar supports regex (the .* button), case sensitivity, whole-word matching, and files to include / files to exclude globs.
files to include: src/**/*.ts
files to exclude: **/*.test.ts
That two-line combo finds matches in source files while skipping tests. Goes a long way when grepping a large codebase.
F12 jumps to definition. Shift+F12 finds all references. Cmd+- / Alt+Left goes back where you came from. These four shortcuts together are what makes VS Code feel like an IDE.
The integrated terminal
Ctrl+` (backtick) toggles the terminal. Same shortcut on every platform.
Habits that compound:
- Split it (the icon, or
workbench.action.terminal.split) to run a dev server in one pane and tests in another. - Use multiple terminals — one per long-running process. The dropdown at the top of the terminal panel switches between them.
- Drag a file from the sidebar into the terminal to paste its path.
If you live in a system terminal today, the integrated one is worth a real try. The friction of switching windows adds up over a day.
Source control panel
The Git icon in the activity bar (or Cmd+Shift+G) opens a clean diff view of staged and unstaged changes.
The flow that wins:
- Open the panel.
- Click a file to see its diff side-by-side.
- Stage hunks individually with the
+next to each chunk in the diff. - Type a commit message at the top. Cmd+Enter / Ctrl+Enter commits.
For anything beyond simple commits, the command line is still faster. But for reviewing your own changes before pushing — and especially for staging part of a file — the GUI is genuinely better than git add -p for most people.
For deeper Git operations, the GitLens extension is the only one I’ll recommend unreservedly later.
Try it yourself. Open a project. Without using the file tree, open three files in 30 seconds using only Cmd+P. Then jump between them with Ctrl+Tab. Then use F12 on a function call to jump to its definition, and Cmd+- to come back. That’s the navigation loop most of your editing time is going to live in.
Settings worth changing
Open settings with Cmd+,. A handful worth toggling on day one:
{
// Format on save — life-changing for consistent style
"editor.formatOnSave": true,
// Trim trailing whitespace — kills noisy diffs
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
// Show whitespace so you can see what's going on
"editor.renderWhitespace": "boundary",
// Sane indent (Python convention; pick what your language wants)
"editor.tabSize": 2,
"editor.insertSpaces": true,
// Word wrap is nicer for prose, off is better for code
"editor.wordWrap": "off",
// Auto save after focus moves elsewhere
"files.autoSave": "onFocusChange",
// Confirm before drag-moving files (saves accidents)
"explorer.confirmDragAndDrop": true,
}
Format-on-save plus a configured formatter (Prettier, Black, Ruff, gofmt) is the single biggest quality-of-life win in modern editors. Set it once and forget it.
Per-language settings
You’ll want different settings per language. Use nested blocks:
{
"[python]": {
"editor.tabSize": 4,
"editor.defaultFormatter": "charliermarsh.ruff"
},
"[typescript]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Project-specific settings go in .vscode/settings.json at the repo root and override your global preferences. Commit them — your team will thank you.
Workspace-level vs user-level
Two layers worth knowing:
- User settings — apply to every project. Your formatter preferences, theme, font.
- Workspace settings — apply to the current folder. Shared with teammates if committed.
When in doubt, put it in workspace settings. Personal preferences in user settings.
Snippets and emmet
Emmet (div.card>h2{Title}+p → expand) ships built in for HTML/JSX. Type the abbreviation, hit Tab.
User snippets via Snippets: Configure User Snippets in the Command Palette. A few well-chosen snippets for the boilerplate you type most beat hunting for a packaged “snippet pack” extension.
A short list of extensions worth installing
The longer the list, the slower VS Code becomes. Pick from this short one and stop.
- The official extension for your language — Python (Microsoft), Pylance, ESLint, the TypeScript SDK, Go (Google), rust-analyzer, etc. These are non-negotiable.
- Prettier for JS/TS/JSON/CSS/Markdown formatting.
- GitLens for inline blame and rich Git history. Disable the parts you find too chatty.
- Error Lens to surface diagnostics inline. Once you’ve used it, you can’t go back.
- EditorConfig if your project has one.
That’s roughly it. Theme and icon pack are taste. Everything else is probably solving a problem you don’t have.
What to skip: snippet packs, “auto-import” extensions for languages whose LSP already does it, “AI” extensions that duplicate features your existing copilot already provides, and shortcut cheat-sheet extensions (you have the Command Palette).
Habits that compound
A list of habits, ordered roughly by leverage.
- Reach for the Command Palette before anything else. Even when you know the shortcut.
- Open files by name (Cmd+P), not by clicking. Faster, fewer context switches.
- Format on save. Stop manually fixing whitespace.
- Use F12 and Shift+F12 as your navigation backbone for codebases you don’t know.
- One terminal per concern. Dev server in one, tests in another, scratch shell in a third.
- Use the source-control diff for self-review before every commit.
- Commit
.vscode/settings.jsonwhen it benefits the team.
The combined effect after a week or two is meaningful. The combined effect after a year is a different relationship with the editor.
Try it yourself. For one full day, every time you reach for your mouse, stop and ask whether the Command Palette could do it faster. Don’t force it — just notice. Most engineers find they were reaching for the mouse for things they could trigger with five keystrokes. Awareness is most of the change.
Common pitfalls
- Installing every extension you read about. Extensions slow startup and conflict with each other. Treat them like dependencies.
- Ignoring the Command Palette and drilling shortcuts. You’ll learn the right shortcuts faster by finding commands and seeing their bindings.
- Keeping
editor.formatOnSaveoff “to stay in control.” You don’t need to stay in control of whitespace. - Multiple terminals you’ve forgotten about. Clean them up periodically; long-running processes leak.
- Personal user settings committed to the workspace. Decide which layer a setting belongs in.
Recap
You now know:
- The Command Palette is the single shortcut worth memorising
- Cmd+P for files, Cmd+Shift+O for symbols, F12 for definition, Shift+F12 for references
- Multi-cursor has three flavours: Alt-click, Cmd+D, Cmd+Shift+L
- The integrated terminal and source-control panel are worth using over external tools
- A short list of settings (format on save, trim whitespace) and a short list of extensions go a long way
Next steps
The other half of editor productivity is the workflow around it: source control, code review, tests. The pieces for those live in pytest basics and Mocks, Stubs, and Fakes.
Related: Resume Tips for Software Engineers, Software Engineer Interview Prep.
Questions or feedback? Email codeloomdevv@gmail.com.