Docs / Axion IDE manual / Search and Replace

Search and Replace

Find text across the project (literal or regex, with file filters), replace it safely, and what a result row does when you click it.

Search and Replace

Axion has two searches, and they answer different questions.

You want Use
The text you can see — a symbol, a string, TODO, a word in your notes Find in Project: Ctrl+Shift+F, then the Text & Replace tab. No index, no setup, instant
The code that does something, when you cannot remember what it is called the Semantic tab — "where are passwords scrubbed?" finds SecretRedactionService even though the word "scrubbed" is nowhere in the code
Replace it in one file Ctrl+H — the editor's own replace bar
Replace it everywhere Replace All… in the Search view, which shows you what it would do first

Find in Project

Ctrl+Shift+F opens the Search view. Type a query and press Enter.

Matches are grouped by file, with the number of matches per file and one row per line. The status line says how many matches there are, in how many files, out of how many files were scanned — "No matches in 412 files" and "No matches" are different facts, and only the first one means the search ran.

The options

  • Match case — off by default, so total finds Total and TOTAL.
  • Regex — the query becomes a regular expression: int\s+\w+\s*=, ^\s*//, (TODO|FIXME):. In the replacement, $1 and $2 are the groups you captured.
  • Whole word — cat does not match catalog. It also works with punctuation, so .cs still matches Program.cs.

Without Regex the query is literal text: searching a+b looks for those three characters.

File filters

Two optional boxes, comma- or space-separated, using globs: *.cs (any C# file, any depth), src/*.cs (directly in src), src/**/*.cs (everything below it). Files limits the search; Skip removes from it — *.cs with tests/* skipped means "C# in the project, except the tests".

.git, node_modules, bin, obj, dist, build, .venv, target and packages are never searched. Neither is anything that is not text: a PNG read as UTF-8 matches a search for ?, and a result like that looks authoritative while being meaningless.

What clicking a result does

A row is a path, and a path can be a C file, a screenshot or a compiled program — so the click asks what the file is before it does anything:

  • Code and text open at that line.
  • Anything the editor cannot show (an image, a PDF, an archive, a database) asks first, and says what kind of file it is: "notes.pdf is a PDF document, not text… Open it with your operating system?"
  • A program (.exe, .deb, .rpm, .AppImage, .dll, .so, .jar, .bat, .ps1, …) asks first, and says so plainly — "build\Axion.App.exe is a program, not text. Opening it hands it to your operating system to run — Axion will not open it in the editor."

Launching a program is the one action in that view which reaches outside Axion and cannot be undone, and a search result is the worst place for it to happen by accident — you are reading, not intending to run anything. Cancel is a real answer, and the status line reports what happened, including "your system has nothing registered for this file".

Replace

In one file: Ctrl+H opens the editor's replace bar (Next/Previous, Replace, Replace All). Every replacement goes on the undo stack.

In the project: Replace All… is deliberately two steps. It works out what would change and says so — "Replace 12 matches in 3 files? Nothing has been written yet." — and only the second button writes. The count you approve comes from the same walk that does the writing, so the preview cannot promise something the replacement then does differently.

Two more things it does, both about not damaging your repository:

  • Only files whose text actually changed are written, so a one-line replace does not restamp every mtime in the project (which would make a whole-project edit out of a one-word change in git status).
  • A file it cannot write is reported, not skipped silently, and the count stays honest.

There is no keyboard shortcut for the project-wide replace, on purpose: it rewrites many files, and a destructive action should not be one slipped keystroke away. The palette entry is Search: Replace in Project.

When a search finds nothing

  1. Did it run? The status line says how many files were scanned. No sentence at all means the query was empty.
  2. Is it a filter? A Files: box left over from last time (*.cs) hides your .md notes.
  3. Is it a Regex problem? A pattern with a typo is reported in words and the search does not run, rather than running with an empty pattern.
  4. Is the file in a skipped folder? node_modules and bin are never searched, by design.

Updated 2026-11-03

An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.