Quick Search Box
A keyboard-first developer tool for VS Code, inspired by Vim: search, read and find your way around code without
leaving the keyboard. Press Ctrl+Alt+Q, type a shell command or a qs verb (text search, file reads,
definitions, references, callers up to the entry points, outline, problems, Git state, history and blame), press
Enter, and the answer comes back as numbered rows in the Quick Search panel, each path:line one key or click away.
While no command is shown, the panel follows your cursor: the file, its problems, the function you are in and
everything that can reach it, the functions it calls, Git state and an outline.
Two more tools share the panel:
- The terminal box (Ctrl+Alt+X) sends a line to one of your terminals and brings what it prints, and its
exit code, back to the panel.
- Edit lines (
qs sub, qs ins, qs del, qs mv, qs cp) change numbered lines of a file, and show
exactly what will change before you press Enter.
Every command gets a number, every result row a tag (R01, R02, ...), and every common question a key.
Quick Search is plain JavaScript with no dependencies. It targets VS Code on macOS: shell commands run in zsh, the
panel is set in Menlo, text search uses the ripgrep inside the macOS VS Code app, and the updater looks for VS Code
in /Applications.
Install
- From the Marketplace: search for Quick Search Box in VS Code's Extensions view. It is a pre-release for
now: choose Install Pre-Release Version.
- From a
.vsix file: code --install-extension quick-search-<version>.vsix, or use Extensions: Install from
VSIX… in VS Code.
- From source:
sh scripts/package.sh builds dist/quick-search-<version>.vsix. It needs only Node.
- From a clone, in every profile, and to update:
sh scripts/update.sh in the clone, or Quick Search: Update
(Ctrl+Alt+Shift+U) once it is installed. It runs git pull --ff-only, builds the .vsix and installs it with VS
Code's command line into the Default profile and every profile that has its own extensions, then reloads the
window. The clone is the setting quickSearch.update.clone (~/dev/quick-search). Other windows keep the old
version until they reload: each shows Quick Search running X, installed Y: click to reload in its status bar
(a click reloads the window, as Developer: Reload Window does; with quickSearch.keys.vscodeCommands on, it
says reload (Ctrl+Alt+Shift+W)).
The panel is Quick Search in the Explorer (Explorer: Focus on Quick Search View, or Ctrl+Alt+A).
A first look
- Press Ctrl+Alt+Q, type
qs grep -w total and press Enter. The matches come back as rows R01, R02, ...
- Press Ctrl+Alt+Q again and type
o2: the editor opens at the place of row R02.
- Put the cursor on a function's name and press Ctrl+Alt+Shift+H: its callers, up to the entry points.
- Press Ctrl+Alt+X, type
npm test and press Enter: the line runs in your terminal, and its output and exit
code come back to the panel when it ends.
The panel
#0145 READY 16:41:45 | QUERY | FOCUS editor | WIN focused
FILE src/billing/billing-rules.ts
AT 19:5 | saved | typescript | 45 lines | SYM buildBillingAccessProjection
DIAG 0E 0W | OTHER 3E (+66 known hidden) | GIT +0 ~2 ?1
--------------------------------------------------------------------------------
Q> qs callers buildBillingAccessProjection
OK EXIT 0 | 0.1 s | 1 entry point | 1 function | complete | tests hidden 2
--------------------------------------------------------------------------------
R01 src/billing/billing-rules.ts:17: DEF buildBillingAccessProjection
R02 src/handlers/refund.ts:6: E1 NO REFS handler
R03 src/handlers/refund.ts:6: T1 <- handler | NO REFS
...
PAGE 1/1 | R01-R03 of 3 | COLS 80 | ROWS 49 | o<row> opens path:line
- Row 1 says whether the last command has finished.
#0145 counts commands, so the next one is #0146.
BUSY shows while a command runs and its rows are being drawn, READY once they are drawn. LIVE or QUERY
says whether the panel follows the cursor or shows a result. FOCUS says where typed text would go: editor,
diff, search (a Search Editor), results (the max view), query-box, terminal-box, panel (Quick Search
itself), preview, terminal, none (no editor is open) or other and the tab's name (other Settings).
WIN unfocused means this VS Code window is not the one in front.
- Rows 2 to 4 follow the cursor: the file, the position, the symbol you are in, problems (diagnostics listed in
quickSearch.knownNoise are counted, not listed) and Git.
- Rows 6 and 7 echo the command and sum it up:
OK EXIT 0 | 0.2 s | 5 lines | LOG /tmp/qs-501/48213-0145.log, ERR EXIT 1 | ..., ERR TIMEOUT 60 s | killed | ....
While you type in the query box they preview it (PENDING | not run | 87 chars). The full output is in the log
(see Privacy).
- A
WARN row takes the place of the dashed line under row 7 when what you type could go somewhere you do not
expect: VS Code is not the front window, or the keyboard is in a terminal, a preview, the panel or another tab.
It ends with the way back, such as WARN FOCUS terminal: typing runs in the terminal; Ctrl+Alt+Q then qs reset.
- Results: standard output rows are
R01, R02, ..., standard error rows !01, code rows 41|... (the line
number, then the line). A batch of several commands gets == part | EXIT n before each part. Colour codes are
removed, tabs expanded, and long rows wrap at the panel's width on +.
- Footer:
PAGE 1/3 | R01-R40 of 112 | COLS 80 | ROWS 49, then | max: wider past 3 pages and
| o<row> opens path:line when rows open places. While a command runs: PAGE -/- | #0146 running. While the panel
follows the cursor: LIVE | follows cursor | rows 30/41 | COLS 80.
- Size: COLS and ROWS follow the panel's size and
quickSearch.fontSize (13 px Menlo). The rows are black on
white, whatever the colour theme.
Where the keyboard is. VS Code does not tell an extension when the keyboard moves between an editor and a
terminal that is already the active one, so FOCUS terminal follows what Quick Search can see: a terminal opening
or becoming the active one, its first input, Ctrl+ from outside a terminal, and Ctrl+Alt+Q pressed in a terminal. A key or click that moves the cursor in an editor, Ctrl+ or Ctrl+Alt+Shift+E pressed in a terminal, and Quick
Search moving the keyboard itself (qs open, qs reset, oNN, max) say that it left. Ctrl+and Ctrl+Alt+Shift+E are seen only withquickSearch.keys.vscodeCommandson (see [Keys](#keys)). Cmd+J, a click on the terminal that is already active, or a click that does not move the cursor are not seen; row 1 catches up at the next of the events above. When unsure, it saysterminaland keeps itsWARN` row.
The query box
Press Ctrl+Alt+Q, type, press Enter. From the title down the box shows:
Quick Search
[the input; qs help while it is empty]
Shell or qs command (qs help). Enter runs, Esc cancels.
1 qs cat src/lib/codeSession/types.ts:1-400 recent
2 qs git . recent
3 qs cat src/app.ts file
4 qs open src/app.ts file
5 qs cat src/lib/codeSession/ prefix
What you can type:
- Any shell command. It runs in
zsh -lc in the first workspace folder, with your own functions from
~/.config/quick-search/prelude.zsh (quickSearch.query.prelude), no colours or pagers, stdin closed, and a 60 s
timeout (quickSearch.query.timeoutSec). ;, pipes, loops and quoting work as in a terminal. Esc while it runs
cancels it. When the window has several folders, or the first one holds a repository below it, the summary says
where it ran (OK EXIT 0 | 0.1 s | cwd projects | 4 lines).
- A
qs verb (see Verbs). Their rows are path:line: KIND name | detail, so they pipe into the shell:
qs refs X | grep -v /mock/ | wc -l (the pipe runs only if qs succeeds). A batch is cut at ;:
echo one; qs def F; ls.
- An edit line (
qs sub, qs ins, qs del, qs mv, qs cp): see Edit lines.
- A panel word:
n, p and page K page the last result; oNN opens the path:line of row RNN (oNN:L
its file at line L); cNN is qs cat RNN (cNN:A-B another range); live follows the cursor again (so does
moving it yourself); max [K] shows the last result in an editor tab with K columns of at least 80 characters,
where n and p move a whole page, and min closes it.
While a command runs the box takes only qs cancel (the line under the hint says so).
Numbered items and references
The numbered items are commands worth running again: the project's recent commands (most recent first, each
once), qs cat and qs open for the files you looked at last, and prefixes to complete (qs cat and a recent
folder). Each is N, two spaces and the command, with its kind (recent, file, prefix) beside it.
quickSearch.query.candidates says how many (12: 6 commands, 4 file commands and 2 prefixes; 0 lists none). The
numbers stay fixed while the box is open. A label longer than 80 characters is cut at its end with ....
A reference at the very start of the input stands for an item, in three forms:
- the number alone, as the whole input:
5 is item 5;
- a number and a range, then anything:
5:1:14 is characters 1 to 14 of item 5 (both ends included), and what
you type after it is added. With item 1 qs cat src/lib/codeSession/types.ts:1-400, 1:1:27busy.ts:1-400
runs qs cat src/lib/codeSession/busy.ts:1-400;
- a number and one word, only for a prefix item: with item 5
qs cat src/lib/codeSession/, 5busy.ts:1-400
runs the same.
A part of an item anywhere in the line, in braces: {N:A:B} is characters A to B of item N, so a path
that a listed line holds goes into another command. With item 2 qs cat src/lib/codeSession/types.ts:1-400,
qs diff main {2:8:35} runs qs diff main src/lib/codeSession/types.ts. A line may hold several, and a
reference at its start too.
The input keeps what you typed, and a runs: line under the hint shows what Enter will run:
Quick Search
[1:1:27busy.ts:1-400]
Shell or qs command (qs help). Enter runs, Esc cancels.
runs: qs cat src/lib/codeSession/busy.ts:1-400
1 qs cat src/lib/codeSession/types.ts:1-400 recent
A long runs: line is never cut: it goes on over as many lines as it needs, each continuation indented six
spaces, so the command is those lines joined. A line never ends or begins at a space of the command, nor, where it
can break elsewhere, at a small mark such as ., - or ~, which is easy to miss at a line's end or start.
Everything else runs as typed, with no runs: line: a command that starts with a number (7z a x.7z dir,
2to3 file.py) is that command, whatever item 7 or item 2 is. To run a number alone, an N:A:B or a {N:A:B}
as typed, start with a space. A tail that starts with a digit needs a range (1:1:26/2fa.ts, not 1:1:272fa.ts).
A bad reference shows on that line, such as
bad reference: no item 9 (1 to 5); start with a space to run as typed, and Enter runs nothing until you put it
right.
Only Enter runs, never a click. The arrow keys move the highlight; Tab puts the highlighted item (or the
next one) into the input, and so does a click on an item. An item that would itself read as a reference goes in
after a space, so that it runs as it is. Ctrl+Alt+Q with the box open brings the keyboard back to it. Esc
closes the box and drops its text.
The board
The box lists a dozen items. While either box is open, the same numbered list shows again where there is room for
more of it, up to 50 items (quickSearch.board.items): in the max view when it is open and in front, else in the
panel.
BOARD 1-36 of 36 | K 3 x 12 | COLS 60
1 npm test 13 git status ...
2 npx vitest run src/lib/codeSession/busy.test.ts 14 ./dev.sh --port 4000 ...
- The numbers are the box's. Items 1 to 12 are the ones the box shows; the board goes on with more of the same
history, and a reference in the box may name any of them (
25, 31:1:28busy.ts).
- In the max view the items stand in as many columns as fit, each 60 characters wide; in the panel, in one column.
The first row says what is shown: the items' numbers, how many there are, and the columns (
K 3 x 12: three
columns of twelve rows).
- It stands in the lower half of its view, its last row right above the footer, where the open box does not cover
it. It is there to be read only: nothing on it is a link, and it does not scroll. It goes when the box closes,
and the result is back.
quickSearch.board.items: 0 shows no board.
The terminal box
A command of the query box runs on its own, with stdin closed and a timeout. The terminal box is for commands that
belong in a terminal: a dev server left running, a test run in your own shell with its environment, a program that
asks questions. Press Ctrl+Alt+X, type the line, press Enter: the line goes to a terminal, and the panel shows
what it printed and its exit code.
Quick Search: Terminal to zsh in ~/app/api
[the input; command for zsh or @name command while it is empty]
Terminal line (@name line, ^C). Enter sends, Esc cancels.
runs in zsh (idle) ~/app/api
> npm test
1 npx vitest run src/lib/codeSession/busy.test.ts recent
2 npm run dev recent
3 npx vitest run src/lib/codeSession/ prefix
Where a line goes: to the terminal that was the active one when the box opened, named in the title with its
folder. A window with no terminal has the target qs: the first line creates a terminal of that name in the
first workspace folder.
@name line goes to the terminal with that name instead, created when there is none, so @dev npm run dev
keeps a server in its own terminal. A name is 1 to 16 letters, digits, ., _ or -. With several terminals of
one name the box sends to none of them and says so. @name alone makes that terminal the target without
sending anything.
^C alone, or @name ^C, sends Ctrl+C to that terminal.
The keyboard stays where it was. The terminal is shown, and the keyboard goes back to where it was before the
box opened.
The lines under the hint say where Enter sends the line, how that terminal stands and its folder, then the
line itself after > . In the table the two are written as one:
| It reads |
Means |
runs in qs (idle) ~/app > npm test |
The terminal was seen to return to its prompt, and nothing has started there since |
runs in dev (new) ~/app > npm run dev |
No terminal of that name yet: Enter creates it, in that folder |
runs in qs (state unknown) ~/app > npm test |
The terminal has not shown this window a prompt yet: it may be running something. Sent all the same |
runs in qs (no shell integration) folder ? > npm test |
Sent all the same; whether it is busy, its folder, and what it prints are not known |
runs in dev (busy: npm run dev) ~/app > Ctrl+C |
^C, for the command running there |
busy: dev runs npm run dev; only ^C is sent |
Anything else while a command runs there: Enter sends nothing |
folder gone: ~/app; cd in the terminal qs itself, only ^C is sent |
The terminal's folder no longer exists: run cd in that terminal first |
several terminals are named dev (2): ... |
Enter sends nothing: rename or close all but one |
bad reference: ..., not sent: ..., BUSY #0007 running; ... |
Enter sends nothing |
Busy, idle and folders come from VS Code's shell integration (the marks its shell scripts put around every
command). A busy terminal takes nothing but ^C, since a line sent then would be typed into the running program.
A terminal that was already open when the window loaded says state unknown until a command has been seen to end
there. Without shell integration the line is still sent, and its output is not captured.
The numbered items are the project's terminal lines, as a shell's up arrow would give them if it knew the
folder: first the lines that ran in the folder the target terminal is in, then the project's other lines, then
prefixes to complete. References work as in the query box.
One box at a time. Ctrl+Alt+Q with the terminal box open opens the query box instead, and Ctrl+Alt+X the
other way round. An edit line is never sent to a terminal: it belongs to the query box.
What comes back. The line takes the panel's next number, row 6 echoes it, and row 7 follows the command:
Q> npm test
TERM qs | exit 1 | 12.4 s | 86 lines
--------------------------------------------------------------------------------
== npm test
R01 RUN v2.1.4
R02 FAIL src/lib/codeSession/busy.test.ts:41:7: expected 2 to be 1
While it runs, row 7 says TERM qs | running 12 s | 34 lines so far. When it ends, the output becomes the result's
rows, paged and opened like any other. Colours and other escape sequences are taken out, and a progress line shows
as it last stood. Up to 10,000 lines are shown. qs term last in the query box shows the last line sent and its
output again, qs term last NAME the last one sent to that terminal. Running a line through shell integration and
reading its output need VS Code 1.93 or later.
Edit lines
Five verbs change lines of a file from the query box: exactly, by line number, with a preview before Enter.
| Line |
Does |
qs sub [-nK] [PATH]:L[-M] /old/new/ |
old becomes new in lines L to M. old must be there exactly once, or K times with -nK; otherwise nothing changes. The delimiter is the first character after the place: any punctuation mark that neither text holds (qs sub :34 ,;, * 100) / 100;,). |
qs ins [PATH]:L TEXT |
New lines before line L (L may be one past the last line). In TEXT \n starts a new line and \\ is a backslash; the spaces a line starts with are its indentation. No TEXT: one empty line. |
qs del [PATH]:L[-M] ANCHOR |
The lines go. The first of them that is not blank must hold ANCHOR, a word or more of it. |
qs mv [PATH]:L[-M] TO ANCHOR |
The lines, moved before line TO. |
qs cp [PATH]:L[-M] TO ANCHOR |
The lines, copied before line TO. |
PATH is a path as the other verbs take one; with no path (qs sub :14 /50/75/) the line edits the file in the
active editor. Line numbers are those of the file before the edit.
Before Enter the box shows what the line would do:
Quick Search
[qs sub -n4 :27-32 /sum/acc/]
Shell or qs command (qs help). Enter runs, Esc cancels.
edit: sub src/cart.ts:27-32 | 4 of 4 | 3 lines | 48 chars
old 27 len 14: let sum = 0;
new 27 len 14: let acc = 0;
old 30 len 21: sum = sum + line;
new 30 len 21: acc = acc + line;
old 32 len 13: return sum;
new 32 len 13: return acc;
- The first row is
edit: VERB PATH:LINES | [F of K |] N lines | S chars: the file and lines, for sub how often
old was found and how often it was wanted, how many lines the edit gives or takes, and how many characters they
have in all. mv and cp say where to (edit: mv src/cart.ts:9-13 to 3 | 5 lines | 58 chars).
- For
ins, mv and cp the next rows are the lines around the place, so that you can check it: before N len L:
the line above it and after N len L: the line below.
- Then
old N len L: a line as it is now and new N len L: a line as it will be (N its number, L its length,
indentation included). A new line is always shown whole, over several rows if needed, so every character Enter
would write can be checked first. At most 8 lines are shown, then ... 12 more rows.
- A line that cannot be applied shows one row saying why, such as
edit: refused: old found 2 times in 15-19, not 1, edit: refused: line 21 does not hold the anchor or edit: not found: src/none.ts, and Enter runs nothing.
Enter applies what the rows show, and only that, as one edit of the document: one undo takes it back, and
nothing is saved. If the document changed since the preview, nothing is changed and the result says so
(ERR EXIT 75 | refused: src/cart.ts changed since the preview (version 4, now 5): nothing changed). The file is
shown in the editor, the keyboard stays where it was, and the result is the changed lines as the document now has
them, marked UNSAVED.
An edit line is read whole: ;, |, &, $( ), quotes and backslashes in it are text, and no part of it reaches
a shell, so it cannot be part of a batch or a pipe. Its history keeps only the verb and the path
(qs sub src/cart.ts:), as a prefix to complete. With quickSearch.protectSecrets, credential files are not
edited.
Verbs
Text search uses the ripgrep VS Code ships for Find in Files, with the same files.exclude, search.exclude and
.gitignore rules; the Git verbs ask VS Code's Git extension; the others ask the language servers already running.
Nothing of this runs in a shell. qs help lists them.
| Verb |
Answers with |
qs grep [-r] [-w] [-i\|-s] [-C N] [-o] TEXT [--in GLOB] |
path:line: code rows. Literal and smart case by default; -r regex, -w whole words, -C N context lines as 41\|code rows, -o the function around each match. The first 200 matches, then MORE n: narrow with --in GLOB. The text is the rest of the line. |
qs cat PATH[:L\|:A-B\|:A+N] ... |
A FILE row (N lines \| A-B), then numbered 41\|code rows. No range: the first 60 lines; :L: 20 lines either side. A glob reads up to 10 files; at most 400 lines a command. An editor with unsaved changes is read as shown and marked \| UNSAVED editor copy. |
qs files GLOB |
Openable path:1: FILE rows, sorted; a bare name matches anywhere in file names (qs files Ticket), and when none does, the files of a folder of that name. Smart case. |
qs sym [-t] PATTERN [--in GLOB] |
Workspace symbols whose name contains PATTERN; with no language server answer, declarations found by text, then file names. |
qs def [-b] SYMBOL [--in GLOB] |
The definition: its signature and body (20 lines; -b all). |
qs refs [-d] [-t] SYMBOL [--in GLOB] |
References (-d with the declaration, -t with tests). |
qs callers [-t] SYMBOL [--in GLOB] |
The caller tree up to the entry points (see Caller tree). |
qs callees SYMBOL [--in GLOB] |
The functions it calls in the workspace. |
qs hover PATH:LINE:COL\|SYMBOL |
The hover text. |
qs outline [-a] PATH |
The file's symbols, classes open one level (-a all). |
qs diag [file\|PATH\|all] |
Errors and warnings; known noise hidden unless all. |
qs open PATH\|GLOB[:L[:C]] |
Opens the file at the line; a glob with several matches gives FILE rows that oNN opens. |
qs term last [NAME] |
The last line the terminal box sent (to NAME) and its output. |
qs reset |
Closes pickers and puts the keyboard in the editor. |
qs cancel |
Stops the running command. |
qs git [PATH] [--untracked] |
BRANCH (upstream, ahead, behind), HEAD, UPSTREAM, BASE (the default branch), FETCHED, LOCAL (staged, changed, untracked, conflicts). With a PATH: IDENTICAL or DIFFERS with a row per file (M +12 -3). --untracked adds a row per untracked file. It never fetches. |
qs git [REPO] --branches [PATTERN] |
Local and remote branches, newest first: BRANCH feature-x 3f2a1b0 2026-10-13 \| ahead 5 \| behind 0 \| subject. PATTERN is part of a name or a glob (feature-*). The first 50. |
qs log [PATH\|REF] [N] |
The last N (10) commits, of PATH (also one deleted since) or from REF (qs log origin/feature-x 5): hash date author \| subject. |
qs show [-p] COMMIT [PATH] [--in GLOB] |
The commit, its message and a row per file it changed; -p adds each file's patch. |
qs blame PATH[:L\|:A-B] |
A row per run of lines from one commit, then the numbered lines. |
qs diff [--stat] [REF\|A..B\|A B] [PATH] [--in GLOB] |
The files on disk against REF (no REF: the uncommitted changes against HEAD), or two commits against each other: a row per file, then numbered hunks; --stat the file rows only. |
- Symbols are
Name, Container.name or path:line[:col]. In languages without a language server, qs def
and qs outline find declarations by text (| text match).
- Paths are shown, and taken, from the workspace folder (or the repository's root when the window is opened on
the folder above a single repository); any unique end of a path works too (
qs cat Uploader.kt:35-80). A
repository the window has not opened (qs log ~/dev/other-clone 5) is read with git, read only: no fetch, no
lock, no index refresh.
- Row references:
RNN in an argument stands for the path:line of row RNN, or its commit for qs show:
qs grep -w nextNumber, then qs def R02, qs cat R02, qs blame R02:40-60.
- Exit codes: 0 done, 1 no match, 2 bad arguments, 64 unknown verb, 65 ambiguous (candidates listed), 66 not
found, 77 refused (with
quickSearch.protectSecrets), and NOT READY while the language server loads.
Caller tree and the graph view
While the panel follows the cursor it shows ROOT (the function at the cursor) and everything that can reach it,
up to the entry points:
ROOT quote | src/lib/pricing.ts:40
CALLER TREE quote | 3 entry points (ROUTE 2, MODULE 1) | 5 functions | complete | 0.2 s
E1 ROUTE POST | src/app/api/orders/route.ts:31 | via checkout
E2 ROUTE GET | src/app/api/prices/route.ts:12
E3 MODULE src/jobs/nightly.ts:88 | via refreshPrices
T1 <- checkout | src/lib/checkout.ts:77
T2 <- POST | src/app/api/orders/route.ts:31 | ROUTE
E rows are the entry points (ROUTE: an exported HTTP method in a Next.js app/**/route.*; MODULE:
top-level code; NO REFS; TESTS ONLY). T rows are the tree by depth: <- means "used by the row above";
ref marks a use that is not a direct call, seen a function shown above. Quick Search: Caller Tree opens
the whole tree as a text tab.
- It uses the language server already running, one reference lookup per function. Tests,
node_modules, imports,
comments and other declarations of the same name are left out. It follows calls, dynamic imports and functions
passed as values; not calls by string name, over HTTP, through events or lookup tables.
- Pin (the pin in the panel's title bar) keeps
ROOT on the current function while you move around.
Quick Search: Toggle Graph View (the eye icon) switches the panel to a graph view in your theme's colours: the
function, its problems, callers two levels deep, other references with their code, and callees. A click on a row
opens it in a side editor and leaves your editor where it was; Cmd/Ctrl+click pins ROOT too.
Keys
Ctrl+Alt is Ctrl+Option on a Mac. Your own keybindings.json overrides any of them.
| Keys |
Does |
| Ctrl+Alt+Q |
Query box (also from a terminal) |
| Ctrl+Alt+X |
Terminal box (also from a terminal) |
| Tab, in either box |
The highlighted item into the input, or the next one |
| Enter, in either box |
Runs the input, or sends it |
| Ctrl+Alt+N / Ctrl+Alt+P |
Next / previous page of the last result |
| Ctrl+Alt+M |
Max view on and off |
| Ctrl+Alt+L |
Follow the cursor (live) |
| Ctrl+Alt+A |
Show the Quick Search panel, keeping the keyboard in the editor |
| Ctrl+Alt+Shift+R |
qs refs of the word at the cursor |
| Ctrl+Alt+Shift+H |
qs callers of it |
| Ctrl+Alt+. |
qs def -b of it |
| Ctrl+Alt+S |
qs grep -w the word, or qs grep the selection |
| Ctrl+Alt+Y |
qs blame around the cursor's line |
| Ctrl+Alt+V |
qs log of the file |
| Ctrl+Alt+B |
qs git of the file |
| Ctrl+Alt+Shift+O |
qs outline of the file |
| Ctrl+Alt+Shift+A |
Focus mode on and off |
| Ctrl+Alt+Shift+U |
Quick Search: Update |
Keys for VS Code's own commands (opt-in). With the setting quickSearch.keys.vscodeCommands on (off by default:
Preferences: Open Settings (UI), search for quickSearch.keys, and tick it, or add
"quickSearch.keys.vscodeCommands": true to your settings.json), Quick Search also gives some of VS Code's own
commands a key: Ctrl+Alt+Shift+E View: Focus Active Editor Group (also from a terminal), Ctrl+Alt+Shift+Z
File: Revert File (in an Untitled file, Revert and Close), Ctrl+Alt+Shift+V File: Save (this file only),
Ctrl+Alt+Shift+N File: New Untitled Text File, Ctrl+Alt+Shift+W Developer: Reload Window, Ctrl+Alt+Shift+B
View: Toggle Primary Side Bar, Ctrl+Alt+Shift+S Search: Open New Search Editor, Ctrl+Alt+Shift+P Profiles:
Switch Profile, Ctrl+Alt+Shift+X Developer: Install Extension from Location, and Ctrl+Alt+Shift+, and .
View: Decrease / Increase Editor Width. Ctrl+` stays View: Toggle Terminal and also notes where the keyboard
went, for row 1. With the setting off, Quick Search binds none of these keys and leaves VS Code's and yours as they
are; the keys in the table above are there either way.
With the keyboard in a terminal, VS Code gives a key to the shell unless its command is in
terminal.integrated.commandsToSkipShell, as runCommands is: Ctrl+Alt+Q and Ctrl+Alt+X (and, with the setting on,
Ctrl+Alt+Shift+E and Ctrl+) go through it and work there; the other keys go to the shell, so press Ctrl+Alt+Q first. To give Ctrl+Alt+Q back to a program in the terminal (vim, emacs, tmux), add { "key": "ctrl+alt+q", "command": "-runCommands", "when": "terminalFocus" }to yourkeybindings.json(orctrl+alt+x); for Ctrl+, turn quickSearch.keys.vscodeCommands off.
Focus mode
Focus mode is a block of VS Code settings switched on and off as a whole with Ctrl+Alt+Shift+A (Quick Search: Focus Mode
On/Off), for example for a calm editor to type into: no closing bracket or quote added, no auto-indent, no
suggestions popping up or taken by Enter. Turning it off gives you your own settings back.
The list is your file: one JSON object of setting id -> value in ~/.config/quick-search/focus-mode.json
(quickSearch.focusMode.file names another). Quick Search: Edit Focus Mode opens it, creating an empty
one first. Before 0.29.1 it was preset.json and the settings were quickSearch.preset.*: those are still read
while the new ones are not there.
{
"editor.autoClosingBrackets": "never",
"editor.autoClosingQuotes": "never",
"editor.autoIndent": "none",
"editor.acceptSuggestionOnEnter": "off"
}
On: your own value of each setting is kept, the list's value goes into your user settings, and the status
bar shows Focus mode. While it is on, those settings are left out of Settings Sync.
Off (the key again, or a click on the status bar item): your values come back; a setting you changed while it
was on keeps your change.
Room: turning it on also closes the primary side bar and the panel, shows Quick Search and widens it to
quickSearch.focusMode.columns columns (80; 0 leaves the width alone); turning it off reopens what it closed.
quickSearch.focusMode.makeRoom: false leaves the layout alone, and quickSearch.focusMode.layout runs your own on
and off command lists instead (Quick Search: Widen to Columns widens Quick Search from inside such a list):
"quickSearch.focusMode.layout": {
"on": ["workbench.action.closeSidebar", "workbench.action.positionPanelLeft", "workbench.action.closePanel",
"workbench.action.toggleMaximizedPanel", "workbench.action.terminal.focus",
{ "command": "quickSearch.widen", "args": { "step": "workbench.action.decreaseViewSize" } }],
"off": ["workbench.action.toggleMaximizedPanel", "workbench.action.positionPanelBottom", "workbench.action.focusSideBar"]
}
The state is per profile, shared by its windows, and written so that it is never seen half written. A state file
that cannot be read turns nothing on or off: an error names it and offers Clear state, which keeps the file
aside as preset-state.json.broken-<date>-<time> (it may hold your own values of those settings).
Settings
| Setting |
Default |
What it does |
quickSearch.query.prelude |
~/.config/quick-search/prelude.zsh |
A zsh file sourced before every shell command; ignored when missing |
quickSearch.query.timeoutSec |
60 |
Seconds before a command is stopped (its whole process group) |
quickSearch.query.candidates |
12 |
How many numbered items a box lists (0: none, and no board) |
quickSearch.board.items |
50 |
How many numbered items the board shows while a box is open (0: no board; 99 at most) |
quickSearch.query.history |
true |
Keep the commands run in the query box, for the project, and list the recent ones |
quickSearch.terminal.history |
true |
Keep the terminal lines (sent by the box, or seen starting in a terminal), for the project and with their folders, and list them |
quickSearch.query.logDir |
/tmp/qs-<your user id> |
Folder for each command's full output |
quickSearch.protectSecrets |
false |
Keep credentials out of searches and reads (below) |
quickSearch.knownNoise |
none |
Diagnostics counted instead of listed: { source, match, pathGlob }, such as { "source": "YAML", "match": "Unresolved tag", "pathGlob": "**/template.yml" } |
quickSearch.fontSize |
13 |
The panel's font size in pixels |
quickSearch.max.layoutDetails |
false |
Add the view's width and each column's edges, in pixels, to the max view's footer |
quickSearch.update.clone |
~/dev/quick-search |
The clone Quick Search: Update pulls and installs |
quickSearch.keys.vscodeCommands |
false |
Keys for some of VS Code's own commands (Keys); off, Quick Search binds only its own |
quickSearch.focusMode.file |
~/.config/quick-search/focus-mode.json |
Focus mode |
quickSearch.focusMode.makeRoom |
true |
Make room for Quick Search when focus mode turns on |
quickSearch.focusMode.columns |
80 |
The columns it is widened to |
quickSearch.focusMode.layout |
none |
Your own on and off command lists in place of the room |
quickSearch.query.prelude, quickSearch.query.logDir, quickSearch.query.history,
quickSearch.terminal.history, quickSearch.protectSecrets, quickSearch.update.clone, quickSearch.focusMode.file
and quickSearch.focusMode.layout are read from your user settings only, in the profile in use: they name code that
runs, where output goes or what is kept, so a project's .vscode/settings.json cannot change them.
quickSearch.protectSecrets is off by default, so everything is searched and read. On, qs grep, qs files,
qs sym and the --in of qs show and qs diff refuse (exit 77) searches for passwords, secrets, credentials,
private, API, access and auth keys, key material, and token as a word or in a credential compound (accessToken,
refresh_token); every verb refuses to read credential files such as .env, *.pem, *.key and ~/.ssh
(templates such as .env.example are fine), including through a symbolic link; searches and listings leave them
out and do not follow symbolic links (their summaries then end with linked folders not searched); qs show -p and
qs diff do not print their lines; and a shell line that runs a search for such a term, or names such a file, is
not run.
Privacy
Quick Search itself connects to nothing: its only network use is the git pull of Quick Search: Update (the
commands you run are your own). What it keeps, and how to remove it:
| What |
Where |
How to remove it |
| The query box's history: the last 50 commands run in a project, each once |
VS Code's storage for that workspace, on this computer |
Quick Search: Clear Query History (that project's); quickSearch.query.history: false keeps nothing new |
| The terminal box's history: the last 50 lines per folder, sent by the box or seen starting in the project's terminals (typed by hand or run by a task) |
The same |
The same command; quickSearch.terminal.history: false keeps nothing new |
The files you looked at last (20), for the box's qs cat and qs open items |
The same |
Removed with the workspace's storage |
| Each command's full output |
/tmp/qs-<your user id> (quickSearch.query.logDir): a folder only you can open, one file per command |
Logs older than a day are removed; delete the folder at any time |
| A terminal line's output |
Memory only, for the last line sent to each terminal |
Gone when the window closes |
| Focus mode and its state |
~/.config/quick-search/focus-mode.json (your file) and VS Code's storage for the extension, per profile |
Turn focus mode off, then delete them |
| The version installed by Quick Search: Update |
~/.config/quick-search/installed-version |
Delete it |
- Never kept: a line that looks as if it holds a secret, in either box, whatever
quickSearch.protectSecrets
says. That is told by where a secret sits in a command, not by words alone, so qs cat src/auth/token.ts is kept,
but not a value with a secret's shape (GitHub, GitLab, Slack, AWS, Google, npm and sk- keys, a JSON Web Token,
a private key), an Authorization: or API-key header, Bearer ..., a name that says password, secret, token or
credential given a value (GITHUB_PAT=..., PGPASSWORD=..., --passphrase ...), the password option of a tool
(sshpass -p, docker login -p, mysql -p<value>, curl -u user:password, sudo -S, ...), or a password or
token in a URL. Its summary says not kept. As in a shell, a terminal line typed after a space is not kept either.
- An edit line keeps only its verb and path, never the text it writes.
- Quick Search: Clear Query History empties this project's query and terminal histories (another project's is
its own) and says what it removed. Histories kept by versions before 0.28.0, for every window at once, are listed
after the project's for 30 days and then removed; the same command removes them at once.
- The logs folder must be a real folder of yours that no one else can open: where it is a link, someone else's or
open to others, Quick Search leaves it alone, writes to a new private folder in the system's temporary folder
instead, and row 7 says
log folder diverted.
Commands
| Command |
What it does |
| Quick Search: Query (shell or qs command) |
The query box (Ctrl+Alt+Q) |
| Quick Search: Terminal Box (send a line to a terminal) |
The terminal box (Ctrl+Alt+X) |
| Quick Search: Clear Query History |
Empties this project's query and terminal histories |
| Quick Search: Next Page / Previous Page |
Page the last result (Ctrl+Alt+N / Ctrl+Alt+P) |
| Quick Search: Max View On/Off (max, min) |
Ctrl+Alt+M |
| Quick Search: Follow the Cursor (live) |
Ctrl+Alt+L |
| Quick Search: Show the Panel |
Ctrl+Alt+A |
| Quick Search: Cancel Running Command |
Esc while a command runs |
| Quick Search: References / Callers / Definition at the Cursor, Search the Word or Selection, Blame, History, Git, Outline |
The keys for the word at the cursor |
| Quick Search: Caller Tree |
The whole caller tree as a text tab |
| Quick Search: Pin Calls / Unpin Calls |
Keep ROOT on a function, or follow the cursor again |
| Quick Search: Toggle Graph View |
The rows view or the graph view |
| Quick Search: Refresh / Refresh Caller Tree |
Rebuild the panel or the tree |
| Quick Search: Focus Mode On/Off |
Ctrl+Alt+Shift+A |
| Quick Search: Edit Focus Mode |
Open focus mode's list, creating it first |
| Quick Search: Widen to Columns |
Widen Quick Search to quickSearch.focusMode.columns from where the keyboard is |
| Quick Search: Update |
Pull the clone, install in every profile, reload (Ctrl+Alt+Shift+U) |
Development
- Tests:
sh test/run.sh runs the tests against a stand-in for the VS Code API: the panel's rows, the shell
runner with real zsh, both boxes end to end, edit lines, the board, the verbs, the Git verbs over a throwaway
repository, the updater over a throwaway clone and focus mode. They need Node, zsh, git and jq.
- Tests in a real VS Code (macOS):
test/real/golden.sh runs every verb in a separate VS Code on test/fixture
and compares the rows with test/real/golden/ (golden.sh update rewrites them); test/real/git.sh does the same
for the Git verbs. test/real/fixture.sh panel.js (also max.js, files.js, layout.js, widen.js) checks the
panel, the max view, the status bar, a layout of your own and widening. test/real/launch.sh runs the extension
against a TypeScript repository named in test/real/config.json (copy config.example.json).
- Package:
sh scripts/package.sh writes dist/quick-search-<version>.vsix; with --pre-release,
dist/quick-search-<version>-pre-release.vsix, marked as a Marketplace pre-release. PUBLISHING.md says how to
publish. python3 scripts/icon.py (Pillow) draws icon.png.
License
MIT (see LICENSE).
| |