Find bar
MUST wherever there is text to search: an editor, a read-only console, a terminal’s
scrollback. The bar is part of the window, never a popup, and it searches as you type. A list app filters instead of
finding (Torrenta’s box above the transfers), with the same field and the same Escape. Reference: Editora’s
ui/FindReplaceBar.java (the editor’s find and replace), with ui/ConsoleFindBar.java and ui/TerminalFindBar.java
as the same shape over a console and a terminal; Termina’s ui/SearchBar.java; Torrenta’s Omnibox and
FilterQuery. Mirada has no text to search: its Find Image… is a picker, see the QuickOpen template.
Anatomy
Section titled “Anatomy”- 1Query field, focused on open with its text selected, so typing replaces the last query. A single-line selection in the editor is the first query; a multi-line one becomes the scope instead and switches Sel on. A clear button appears while the field has text.
- 2Count "3 of 12", 11 px muted. Empty when there is no query, "No matches" when there are none. Wide enough that the buttons beside it do not shuffle as the digits grow.
- 3Previous and next, 28 px flat icon buttons, the same as Shift+Enter and Enter.
- 4Options as compact toggles with a two-letter caption (match case, regular expression, whole word, preserve case, in selection); the tooltip and the accessible name carry the full meaning. Disabled while the query is empty, except Sel, which is a scope.
- 5Replace replaces the active match and steps to the next; All replaces every match and reports "Replaced 12 occurrence(s)" in the status line. A console or a terminal has no replace row.
- 6Close, top right whatever the bar wraps to. Escape does the same.
- 7Matches are all highlighted while the bar is open, the active one distinctly, and the highlights follow the text as it is edited. They go when the bar closes.
The same bar over a terminal floats at the top right of the pane it searches, in the palette’s materials, so the two read as one family: a lens, the field as the card’s own text, the count, a regex switch, and up, down and close.
- 8Floating card, 380 px wide, radius 8, over the output being read. Enter steps up to older output and Shift+Enter down: a terminal is searched for something recent, so the search starts at the bottom (iTerm2's convention). The arrow keys do the same.
| Property | Value | Reference |
|---|---|---|
| Kind | In-scene, never a popup. Editora docks the bar above the editor area; Termina floats it inside the TerminalView, so each pane of a split has its own and a search never wonders which terminal it is about | MainController (topBox), SearchBar |
| Docked bar | -color-bg-subtle, padding 4 8, spacing 6; icon buttons 28 × 28, flat; the groups (find, replace, options) wrap onto a second line in a narrow window instead of shrinking the fields | .find-bar, .find-bar-icon, WrapRow |
| Floating card | -color-bg-overlay, 1 px -color-border-default, radius 8, 380 px wide, padding 3 4 3 8, shadow 18 at offset 6; the field is the card’s own text at 12.5 px | .search-bar, .search-field |
| Options | Toggles with a short caption; tooltip and accessible name carry the meaning; selected: -color-accent-subtle with -color-accent-fg | OptionToggle, .search-toggle:selected |
| Count | {0} of {1}, 11 px -color-fg-muted, right-aligned; minimum width 64 px | find.count, search.count, COUNT_MIN_WIDTH |
| Debounce | The search runs 150 ms after the last keystroke, and an edit to the text re-highlights after the same 150 ms without moving the caret | debounce, editDebounce, TYPING_SETTLE, searchTyping |
| Threading | A document up to 512 K characters is searched where the request is made; larger ones on one shared daemon thread, latest query only, the result applied on the FX thread. A scrollback is always scanned off the FX thread | SYNC_SEARCH_CHARS, SEARCH_POOL, LatestOnly, TerminalView.searchAsync |
| Bounds | A page of matches around the active one, not every match of a query that matches millions of times; a regular expression has a time budget. Termina keeps the newest 1,000 matches | SearchMatcher.DEFAULT_PAGE, find.tooComplex, ScrollbackSearch.MAX_MATCHES |
| Bad regex | Said in place, never by a dialog: the status line (“Bad regex: …”) or, in Termina, the field in -color-danger-fg and the count “Invalid” | find.badRegex, .search-field:invalid |
| Focus | The bar and its buttons are out of the Tab order; in a terminal Tab belongs to the shell | setFocusTraversable(false) |
Behavior
Section titled “Behavior”- Open: the find command,
C-sin the Emacs keymap andCtrl/Cmd+Fin CUA, Sublime, VS Code and IntelliJ (find.show;F3as well in CUA and Sublime). Termina:Ctrl+Shift+F,Cmd+Fon macOS, since a plainCtrl+letterbelongs to the shell. The command while the bar is already open finds the next match (Editora) or puts the caret back in the field (Termina). - Type and the search runs: every match highlighted, the first one at or after the caret selected and scrolled to. The anchor is the caret at open time, so refining the query does not run away down the document.
- Step: Enter next, Shift+Enter previous, wrapping around at the ends. In a terminal the directions are up and down the scrollback. Editora: Alt+Enter turns every match into a caret.
- Close: Escape or the close button. The highlights go, a search still pending is canceled so nothing moves
after the bar is gone, and focus returns to the editor, the console or the shell. In Termina the Escape is
consumed in the field and never reaches the shell, and the terminal’s own key and mouse filters leave every event
aimed at the bar alone (
fromSearchBar). - Keys in the field. The keymap’s caret and editing chords (
C-a,C-e,C-k,C-y,Ctrl+V/X/C/Z) act on the field, not on the document (TextInputKeymap.installShared; Termina’s and Mirada’sTextInputKeys). Find’s own chords stay global, so next, previous, replace and close work while the field has focus. - Nothing found is one status-line message (“Not found: x”) or the count “No matches”. No beep, no dialog.
- Replace keeps case when AB is on; a replacement that is too slow stops with “Replace stopped: the pattern is too slow” instead of hanging the window.
- A filter box (Torrenta’s omnibox) is the list app’s version: plain words filter the names as they are typed,
key:valueterms become chips,>runs a command.Ctrl+Kfocuses it and is drawn in the box as a key badge. Escape peels one layer: a box with something in it empties, an empty one gives the list back. The box is out of the Tab order so a fresh launch does not land every keystroke in it, and the window’s own chords (undo,Ctrl+Alt+1…9) do not fire while a text field has focus:Ctrl+Zthere is the field’s own undo.
| Key | English |
|---|---|
find.prompt | Find |
find.replacePrompt | Replace |
find.count | {0} of {1} |
find.notFound | Not found: {0} |
find.badRegex | Bad regex: {0} |
find.tooComplex | Search stopped early: the pattern is too complex for this text |
find.replaced | Replaced {0} occurrence(s) |
search.caseTip · search.regexTip · find.wholeWord | Match case · Regular expression · Whole word |
search.older · search.newer · search.close (Termina) | Previous match, up (Enter) · Next match, down (Shift+Enter) · Close (Escape) |
search.none · search.invalid (Termina) | No matches · Invalid |
window.filter.prompt (Torrenta) | Filter · > runs a command · paste a magnet |
In the apps
Section titled “In the apps”- Editora: find and replace over the editor (
FindReplaceBar), with Find in Files (search.inFiles) as a separate results window; the console and terminal tool windows carry the same bar without the replace row. - Termina: the floating card over each pane, with the regex switch; matches are found across soft-wrapped lines, so a word that reached the right edge and carried on is still found.
- Torrenta: the omnibox above the transfers, which filters, runs commands and adds what is pasted.
- Mirada, Modula, nux: no free text to search; Mirada finds an image through a picker.
Pauta 1.4.1 · · Changelog · This page in the latest edition