Part 2 · Everyday editing / 2.3

Search and replace

Four keys cover it: search, find next, replace next, replace all. The real skill is reading the message row — it tells you whether there was a match, whether the search wrapped, and how many replacements were made.

Reading time about 8 min Audience Everyone Prerequisites 2.2 Version v1.0 ・ 2026-08-26
2.3.1

Search: Ctrl+W

Ctrl+F works too — both are bound to search by default.

Enter confirm Esc cancel ←/→ move caret Backspace/Delete edit
Search: project
  • The input is pre-filled with your previous search, so Enter simply repeats it.
  • Searching starts at the cursor and continues to the end, then wraps to the beginning.
  • A match moves the cursor there and highlights it in yellow.
  • An empty search is refused: “Search text cannot be empty”.
  • Esc cancels and leaves the cursor where it was.
Erya searches for exactly what you typed

Case sensitive, no regular expressions, no wildcards. Searching for Error will not find error. Full-width and half-width characters are different too — which, when you are working on CJK documents, is usually exactly what you want.

2.3.2

Find next and wrapping around

Just keep pressing F3.

  • F3 finds the next match using the previous search, with nothing to retype.
  • Pressing F3 before you have searched simply opens the search input for you.
  • At the end of the document it wraps to the beginning and says “Search continued from the start; F3 finds the next match” — that message means you have been all the way round.
  • With no match anywhere: “No match found”, and the cursor does not move.
How to tell how far you have got

Erya does not display “match 3 of 12”. Read the message row instead: “Match found” means you are still moving forwards; “Search continued from the start” means you have wrapped.

2.3.3

Replace: Ctrl+R

Two questions: what to find, then what to put in its place.

Enter confirm Esc cancel ←/→ move caret Backspace/Delete edit
Replace: search for: 2025
Enter/F5 replace next F6 replace all Esc cancel
Replace with: 2026

Notice that the hint bar changes for the second input: you now have three choices.

KeyWhat it does
Enter or F5Replaces the next match and returns to editing.
F6Replaces every match in the document and reports the count.
EscCancels; nothing changes.
Identical search and replacement text is refused

Erya will not do the work for nothing: “Search and replacement text are identical; document unchanged”. In practice that usually means one of the two has a typo.

2.3.4

F5 replaces next, F6 replaces all

The terms are remembered per tab, so you can keep going.

  • After one replacement, F5 continues with the same pair of strings; nothing to retype.
  • F6 finishes off everything that is left in one go.
  • Pressing F5 or F6 before any terms are set opens the replace input for you.
  • Replacement wraps at the end of the document too: “Replaced 1 match from the start”.
  • With nothing left to change: “No replaceable match found”.
Replace-with-confirmation, the Erya way

There is no “ask me each time” mode, but F3 and F5 together are one: F3 to look at the next match, F5 to replace it, or F3 again to skip. Both keys share the same search terms.

2.3.5

The six things the message row says

Almost all feedback from search and replace lands in the last row.

MessageMeaning
Match found; F3 finds the next matchFound it, and the cursor has moved there.
Search continued from the start; F3 finds the next matchFound it, but the search has wrapped.
No match foundNowhere in the document. Check case and full-width characters.
Search text cannot be emptyYou pressed Enter on an empty input.
Search and replacement text are identical; document unchangedBoth fields are the same.
Replaced 1 match; F5 replaces next, F6 replaces all
Replaced all N matches
It worked, and it reminds you what to press next.
2.3.6

Undoing a replacement

Ctrl+Z, but know how big one step is.

  • A single replacement (F5): one Ctrl+Z puts it back.
  • Replace all (F6): the whole batch is one step, so one Ctrl+Z reverts all of it.
  • Ctrl+Y redoes it afterwards.
Think before replacing everything

F6 neither asks nor previews — it simply does it. When you are unsure, walk the matches with F3 first, particularly if the search string is short. If it does go wrong, Ctrl+Z is there, provided you have not saved and left.

2.3.7

Common problems

The five misunderstandings that come up most.

SymptomCause and fix
The text is there but is not foundDifferent case, or full-width versus half-width. Matching is exact (2.3.1).
You wanted to use .*Regular expressions are not supported; those characters are searched for literally.
It keeps finding the same placeThe search has wrapped. Look for “Search continued from the start” (2.3.2).
You only want to replace inside a selectionNot supported. Work through it with F3 and F5 (2.3.4).
The replacement was wrongCtrl+Z. Replace-all reverts as a single step (2.3.6).