A whole-codebase contextual search for VS Code. Results are ranked by relevance (exact matches first) and shown as context cards in a panel that opens to the right of your editor — each card shows the matched line with configurable context above and below, so you can see where a term is defined or used without leaving the results view.
Features
- Relevance ranking, highest first:
- Exact whole-word, case-sensitive
- Exact whole-word, any case
- Substring, case-sensitive
- Substring, any case Matches whose file path contains the query are boosted within their tier.
- Context cards — default 3 lines above / 10 below the match, configurable.
- Syntax highlighting in the context cards, via a locally bundled highlight.js (no network access). The palette follows your light / dark / high-contrast theme; see the note below on how closely it matches.
- Results grouped by file with collapsible headers and per-file match counts.
- Click a card to jump to that exact line in the editor (opened in the left group).
- Live search as you type, with in-panel toggles for match-case, whole-word, and regex that override your defaults for that search. Queries shorter than 3 characters don't auto-search (they match too much); press Enter to run them.
- Non-blocking, streaming search. The scan runs incrementally on the extension host and yields between files, so typing never freezes. A centered loading indicator shows files-searched / files-total while results are being found; once the first result arrives it moves to a compact indicator under the search box and cards stream in, staying ranked (exact matches first) as they appear.
- Expand all / collapse all file groups.
Usage
- Command Palette → Winston Searchill: Search Workspace (default keybinding
Cmd+Shift+Fon macOS,Ctrl+Shift+Felsewhere). This overrides VS Code's built-in Find in Files on that chord; native search is still reachable from the Search view icon and the Command Palette. - With text selected or the cursor on a word → Winston Searchill: Search
Selection or Word Under Cursor (
Cmd+Alt+G/Ctrl+Alt+G).
Settings (winstonSearchill.*)
| Setting | Default | Description |
|---|---|---|
winstonSearchill.contextLinesAbove |
3 |
Context lines above each match. |
winstonSearchill.contextLinesBelow |
10 |
Context lines below each match. |
winstonSearchill.caseSensitive |
false |
Match case exactly. |
winstonSearchill.useRegex |
false |
Treat the query as a JS regular expression. |
winstonSearchill.matchWholeWord |
false |
Match whole words only. |
winstonSearchill.maxResults |
500 |
Stop after this many matches. |
winstonSearchill.maxFileSizeKB |
1024 |
Skip files larger than this. |
winstonSearchill.excludeGlobs |
node_modules, .git, dist, out, … | Globs to exclude. |
The case / whole-word / regex toggles in the panel override the corresponding setting for the current search only; the settings are the defaults each time the panel opens.
Known limitation: panel width
VS Code's extension API does not allow forcing an editor group to an exact
fraction of the window. The panel opens beside your editor and this extension
requests a roughly one-third split via vscode.setEditorLayout, but the exact
width depends on VS Code and can be adjusted by dragging the divider.
Note: syntax highlighting fidelity
VS Code does not expose a theme's syntax token colors to webviews, so the cards can't reproduce your theme's exact keyword/string/etc. hues. Instead, the extension bundles highlight.js locally and applies a curated palette that switches on your light / dark / high-contrast mode and borrows VS Code color variables where good matches exist (e.g. comments). The result is consistent with your theme and correct for light/dark, but keyword colors are an approximation rather than a pixel-exact match. Highlighting covers ~40 common languages (inferred from the file extension); unknown types fall back to plain text with the match still highlighted.
Development
npm install
npm run build # bundle with esbuild
npm run typecheck # type-check only
npm run watch # rebuild on change
Press F5 in VS Code to launch the Extension Development Host and try it.
Building and installing the .vsix
npm install
npm run package # runs `vsce package`, producing winston-searchill-<version>.vsix
Install the resulting file with either:
code --install-extension winston-searchill-0.1.0.vsix
or in VS Code: Extensions view → ⋯ menu → Install from VSIX… → pick the file. Reload the window when prompted.
Roadmap (not in v1)
Fuzzy matching, search history / saved searches, per-card context adjustment, include/exclude glob UI, copy-result, and a read-only replace preview.