How to Open Files Fast in VS Code (Ctrl+P)
Windows: Ctrl+P
Mac: Cmd+P
Linux: Ctrl+P
Ctrl+P (Cmd+P on Mac) opens Quick Open, a search box that fuzzy-matches against every filename in your currently open workspace, ranked by relevance as you type.
**How the fuzzy matching actually works**: VS Code doesn't require a contiguous substring match — typing 'usctrl' can successfully match 'UserController.ts' because the matcher looks for each typed character appearing somewhere in the path in the same order, not necessarily next to each other. This means you rarely need to type a full or even precise filename; a handful of distinguishing characters from the start of meaningful words is usually enough to surface the file you want near the top of the results.
**Beyond filenames**: typing a colon followed by a number after a filename (like 'app.ts:42') jumps directly to that line number once the file opens, skipping a separate Go To Line step entirely. Typing '@' as the first character switches Quick Open into symbol-search mode for the currently active file, and '#' broadens that symbol search to cover the whole workspace instead of only the file names — these are different modes layered onto the same keyboard shortcut and search box.
**Recently opened files**: pressing Ctrl+P with nothing typed yet shows your most recently opened files first, which means for files you've touched in the last few minutes, you often don't need to type anything at all — just press Ctrl+P and arrow down to the file you want.
**A common point of confusion**: Quick Open searches the workspace's file list, while the visually similar Command Palette (Ctrl+Shift+P) searches command names instead. Typing a filename into the Command Palette by mistake returns no useful results because it's matching against command titles like 'Format Document' or 'Git: Commit', not file paths — if your search seems to be returning nothing relevant, double-check you triggered the right one (P vs Shift+P).
**Related shortcuts**: Ctrl+Shift+O for symbol search scoped to the current file once it's already open, and Ctrl+Tab for cycling quickly between already-open editor tabs without a search step at all, which is faster than Quick Open for files you have open right now rather than ones you need to locate first.
**Navigating multi-root workspaces**: if your VS Code window has multiple folders open as a multi-root workspace, Quick Open searches across every root simultaneously by default, and results show a folder name suffix when a filename could plausibly exist in more than one root — worth noticing if you're ever unsure which root's copy of a commonly-named file (like index.ts) you actually opened.
**A mistake worth avoiding**: typing a full relative path including slashes into Quick Open (like 'src/components/Button.tsx') generally still works, but it's slower and more error-prone than leaning on the fuzzy matcher with just a few distinguishing letters from the filename itself, since a single typo in a long path can produce zero matches where a shorter fuzzy fragment would have succeeded regardless.
**Closing Quick Open without opening anything**: pressing Escape at any point discards the search and returns focus to wherever it was before, which matters because accidentally pressing Enter on a highlighted-but-unintended result opens that file and changes your active editor tab — if you're not confident the top result is correct, arrow down through the list to confirm before committing with Enter.