BUILT-IN EDITOR

Find & Replace

Find and replace in the terminal editor. Regex supported. No arcane keybindings required.

Questions this answers

  • Find and replace in terminal text editor
  • Regex search in terminal editor macOS
  • Search across file in terminal editor highlight matches

How it works

Chau7's editor includes a find and replace bar activated with Cmd+F. As you type a search query, matches highlight incrementally throughout the document with a distinct background color. A match counter shows total results and the current match index, and arrow keys or Enter/Shift+Enter cycle through matches with the viewport scrolling to keep the current match centered.

Regex mode toggles on with a button in the find bar, enabling full regular expression search with capture groups. Replace supports backreferences ($1, $2) for capture group substitution. Replace-one and replace-all operations are available, with replace-all showing a confirmation count before applying. Case sensitivity toggles independently from regex mode.

Why it matters

Find and replace is fundamental, but most terminal editors make it unnecessarily complex. Chau7 provides a straightforward find-and-replace bar with regex support, preview of matches, and one-click replace-all. It works the way you expect because it works the way every other editor works.

Frequently asked questions

Does find and replace support regular expressions?

Yes. Toggle regex mode in the find bar to use full regular expression syntax with capture groups and backreference substitution in the replace field.

Can I replace all occurrences at once?

Yes. The replace-all button applies the replacement to every match in the document, with a confirmation showing the total number of replacements.

Is search incremental?

Yes. Matches highlight as you type, with a live count of total results and the current match position in the document.