Better Go To File is a Go to File picker for VS Code style editors that stays literal when your query is specific and gets smarter when it is not. It keeps the speed of Cmd/Ctrl+P, but adds the repository context the default picker throws away. Its distinctive signal is Git-aware reranking: it learns the feature areas you work in, infers nearby teammates from overlapping history, and uses current worktree activity plus shared file lineage to pull the relevant slice of the repo toward the top.
Once a repo gets large, the default picker starts to fail in predictable ways:
- Duplicate filenames like
index.ts,routes.ts, andbutton.tsxcrowd the top of the results. - Monorepo path noise makes it hard to tell which package a file actually belongs to.
- No repository context means the picker has no idea what part of the codebase you work in or which nearby contributors tend to touch related files.
- Short queries are treated as if they were precise, even when they clearly are not.
- Specific intent still wins. Every query token still has to match, and exact path or basename intent remains the strongest signal.
- Ambiguous queries get smarter. Frecency, active-file context, open tabs, and Git reranking matter most when text alone is not enough, then back off as intent becomes explicit.
- Git favors real feature overlap. Current worktree changes, package-scoped history, and inferred teammate activity surface meaningful code areas instead of noisy shared package roots.
- Monorepo results stay readable. Package-aware ranking and path rendering make duplicate filenames easier to distinguish and faster to scan.
- VS Code: install from the Visual Studio Marketplace.
- Open VSX editors: install from Open VSX.
- Manual install: download the latest VSIX from GitHub Releases.
- Cursor note: if extension search lags Open VSX, use
Extensions: Install from VSIX....
Replace the default Cmd+P picker with Better Go To File:
[
{
"key": "cmd+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "cmd+p",
"command": "betterGoToFile.open",
"when": "!inQuickOpen"
}
]Prefer a separate shortcut instead?
[
{
"key": "cmd+u",
"command": "betterGoToFile.open",
"when": "!inQuickOpen"
}
]The short version: text narrows the pool, then context breaks ties. Better Go To File stays predictable for explicit queries and becomes much more helpful when the query is broad.
Every search goes through a few layers:
- Candidate indexing across the workspace, with package-root awareness
- Lexical filtering so every query token still has to match
- Context reranking from frecency, active file/package proximity, open tabs, and tracked state
- Git priors from contributor history and live worktree activity when the query is ambiguous
For the full scoring model, diagrams, and debugging CLI commands, see docs/scoring.md.
Signals used by the scorer
- Frecency from recent and repeated file opens
- Editor context from the active file, same package, open tabs, and nearby directories
- Git state from tracked, ignored, and untracked status
- Contributor overlap from historical Git areas and file lineage
- Session overlay from the files you are changing right now
- Inspect scores locally with
bun run score -- --help - See ranked results with
bun run score:search -- --repo /path/to/repo --debug button - Explain one file with
bun run score:explain -- --repo /path/to/repo button path/to/file.tsx - Run the full validation pass with
bun run check
Runtime code lives in src/. Tests live in test/.
