The omnibox
One box finds everything. Press Cmd+P to open it on files, or Cmd+K to open
it on commands. What it searches depends on the first character you type:
| Prefix | Searches |
|---|---|
| (none) | Files in the project |
> |
Commands |
@ |
Symbols in the open file |
# |
Symbols across the project |
: |
A line number to jump to |
? |
What the prefixes do |
Move with ArrowUp and ArrowDown, press Enter to go, Escape to close.
Delete the prefix to switch back to files.
Files
With nothing typed, the list starts with the files you visited most recently,
then files you open often, before the rest of the project. Typing matches
loosely, so sgnts finds src/sign.ts. Inside a
Topic, every member is searched at once and each
result names its repository.
Commands
> lists every command in Tori: the git commands, layout, editor actions,
the language server, the debugger, and a Preferences: entry for every
setting, which opens Settings on that row. Each shows its shortcut when it has
one. A command that cannot run right now, such as Push to origin with
nothing to push, is shown greyed out with the reason under it rather than
hidden. Read Selection Aloud is the exception: it is listed only when text
was selected as you opened the palette. See
Read a reply aloud.
Symbols and lines
@ lists the functions, classes and other symbols in the file in front of
you; # searches symbols across the project. Both come from the file’s
language server, so they need one running.
:42 jumps to line 42 of the open file.
Search across the project
Press Cmd+Shift+F, or open Search in the right panel, to search every
file in the project.
- Type in Search. Results come as you type, grouped by file, with each match’s line.
- Narrow it with the toggles in the box: Match Case, Match Whole Word and Use Regular Expression.
- Click Toggle Search Details for files to include and files to
exclude (globs such as
src/**/*.tsor**/*.test.ts) and Search Only in Open Editors. - Click a match to open the file at that line.
The top bar has Refresh, Open New Search Editor, Saved Searches, a switch between a flat list and a tree, and more. Inside a Topic, the results are one section per member, and the member chips narrow the search to the members you pick.
To search one folder, right-click it in the Files tree and choose Find in Folder….
Work with results
Right-click a match or a file in the results:
| Item | What it does |
|---|---|
| Copy, Copy All | Copies the match, or every result |
| Copy Path, Copy Relative Path | Copies the file’s path |
| Open to the Side | Opens the file in the other pane |
| Reveal in Files | Shows it in the Files tree |
| Restrict Search to Folder | Adds the folder to files to include |
| Exclude Folder from Search | Adds it to files to exclude |
| Replace, Replace All | Replaces in this match or this file, with replace open |
| Dismiss | Hides this result from the list |
Replace
Click Toggle Replace to show the Replace field. Preserve Case keeps
the case of each match, so replacing user with account turns User into
Account. Then replace one match, one file, or Replace All.
Replacing across files writes to disk and cannot be undone from Search, so Tori asks first, Replace N occurrences, and checks every file before writing: it has to be inside the project, unchanged since the search ran, and the replacements must not overlap. A file that fails any check is skipped whole and reported, never half replaced. An open file is reloaded afterwards, so a later save does not put the old text back.
Saved searches
Click Saved Searches and Name this search to keep the current query. Saved searches can be renamed or deleted from the same list, and each opens in a Search Editor.
Search Editor
A Search Editor opens the results as one editable buffer in an editor tab: every match with its file and line. Use it for a change too irregular for find and replace.
- Click Open New Search Editor in the Search panel, or open a saved search.
- Search as usual. Use More context lines, Fewer context lines or Toggle Context Lines for more or less of each file around the matches.
- Edit the lines in the buffer, with multiple cursors, find and replace or vim keys.
- Press
Cmd+S, or Write every edited line back to the file it came from.
Each edit is checked against what its line said when the search ran. If the file has changed underneath, that edit is refused instead of landing on the wrong line. Search Again rebuilds the buffer from disk, and asks before dropping edits you have not written back.
Find in a file
Cmd+F in an editor opens find over the editor’s top right corner,
Cmd+Opt+F opens find and replace. In a terminal, Cmd+F searches that
terminal’s output.