Skip to content

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.

  • In the current file: cmd-f opens the search bar. enter and shift-enter step through matches. alt-cmd-c, alt-cmd-w and alt-cmd-x toggle case, whole word and regex.
  • In the project: cmd-shift-f opens project search. Results open in a multibuffer, so you can edit matches in place. cmd-shift-h adds replace.
  • Text finder: alt-cmd-f is 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-o lists symbols in the current file.
  • cmd-t searches symbols across the project.
  • cmd-shift-b opens the outline panel, a persistent tree of symbols. It is especially handy next to search results and diagnostics. Its settings are under outline_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-tab opens the tab switcher, sorted by recent use. Keep holding ctrl and press tab to cycle. ctrl-shift-tab goes the other way.
  • ctrl-1 to ctrl-9 activate the nth tab in the pane, and ctrl-0 the last.
  • alt-cmd-left and alt-cmd-right move between tabs.
  • cmd-shift-t reopens the last closed tab.
  • ctrl-- and ctrl-_ 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.