Finding and navigating
Tyrn has several ways to get where you are going. Keybindings use the cmd-shift-p style.
Quick reference
| Task | Keybinding |
|---|---|
| Command palette | cmd-shift-p |
| Open a file | cmd-p |
| Search in the current file | cmd-f |
| Search the project | cmd-shift-f |
| Text finder | alt-cmd-f |
| Go to line | ctrl-g |
| Symbol in this file | cmd-shift-o |
| Symbol in the project | cmd-t |
| Go to definition | f12 |
| Go to type definition | cmd-f12 |
| Go to implementation | shift-f12 |
| Find all references | alt-shift-f12 |
| Go back, go forward | ctrl--, ctrl-_ |
| Next, previous diagnostic | f8, shift-f8 |
| Outline panel | cmd-shift-b |
| Project panel | cmd-shift-e |
| Tab switcher | ctrl-tab |
Open a file
Press cmd-p and type part of a file name or path. Set file_finder.include_ignored to "all", "indexed" or "smart" (default) to control whether git-ignored files appear, and file_finder.modal_max_width to change how wide the finder is.
Search
- In the current file:
cmd-fopens the search bar.enterandshift-enterstep through matches.alt-cmd-c,alt-cmd-wandalt-cmd-xtoggle case, whole word and regex. - In the project:
cmd-shift-fopens project search. Results open in a multibuffer, so you can edit matches in place.cmd-shift-hadds replace. - Text finder:
alt-cmd-fis a quick picker that finds a string across the project and opens the file. Use the button in its actions menu to switch to full project search.
Defaults for the search bar live under search (case_sensitive, whole_word, regex, include_ignored, search_on_type, all off except search_on_type). search_wrap (true) and use_smartcase_search (false) are top-level settings.
Go to definition and references
f12 jumps to the definition of the symbol under the cursor. You can also cmd-click. When there are several results they open in a multibuffer. Set lsp_results_location to "picker" to get a filterable picker instead. alt-f12 opens the definition in a split.
go_to_definition_fallback decides what happens when there is no definition. The default, "find_all_references", finds references instead.
Symbols and the outline
cmd-shift-olists symbols in the current file.cmd-tsearches symbols across the project.cmd-shift-bopens the outline panel, a persistent tree of symbols. It is especially handy next to search results and diagnostics. Its settings are underoutline_panel.- Breadcrumbs above the editor show where the cursor is. Toggle them with
toolbar.breadcrumbs.
Call hierarchy
Put the cursor on a function and use Show Incoming Calls (cmd-k cmd-h) to list its callers, or Show Outgoing Calls from the Go menu to list what it calls. Both are also in the right-click menu. This needs a language server that supports call hierarchy. In the picker, cmd-k cmd-h switches direction.
Tabs and history
ctrl-tabopens the tab switcher, sorted by recent use. Keep holdingctrland presstabto cycle.ctrl-shift-tabgoes the other way.ctrl-1toctrl-9activate the nth tab in the pane, andctrl-0the last.alt-cmd-leftandalt-cmd-rightmove between tabs.cmd-shift-treopens the last closed tab.ctrl--andctrl-_move back and forward through your navigation history.
Single-clicking a file in the project panel opens it in a preview tab, which is replaced by the next preview. Edit the file or double-click it to keep it. Control this with the preview_tabs settings.