Directory tree sidebar
Development reference · View source
The directory tree is a sidebar at the left of the editor area. It is not a pane or a buffer.
| Key | Action |
|---|---|
Space d t | Show or hide the tree |
Space d d | Show and focus it, expand the active file’s ancestors, and select the file |
Ctrl-w h / Ctrl-w l | Move focus across the tree boundary (Ctrl-h / Ctrl-l with editor.fast_pane_keys) |
| Escape | Return to the previous pane, keeping the tree shown |
Space d drefreshes those listings, so files created or moved outside the editor can be revealed. A file outside the workspace, or a buffer with no file, selects the workspace-root row.- The
[dir tree]title sits above the root row. The tree stays rooted at the workspace root when:cdchanges the working directory. - Expansion, selection, scroll position, legend visibility, and a resized width survive hiding it.
- Fullscreen and zen cover it temporarily. Terminals narrower than 36 columns hide it.
Moving in the tree
| Key | Action |
|---|---|
j / k, Down / Up | Next / previous row |
Home / End, gg / ge or G | First / last row |
PageUp / PageDown, Ctrl-b / Ctrl-f | Page up / down |
Ctrl-u / Ctrl-d | Half a page |
gt / gc / gb, H / M / L | Top / middle / bottom visible row |
l or Right | Expand a directory, or select its first child |
h or Left | Collapse a directory, or select its parent |
| Enter on a directory | Toggle expansion |
Space r | Refresh the selected directory |
| Click | Select a row and focus the tree |
| Double-click | Act as Enter: toggle a directory or open a file |
| Wheel | Move the selection three rows |
Digits choose destination panes (below), not counts. A double-click is two left presses on the same row within half a second; a third press starts a new pair rather than toggling the directory straight back.
Tree actions
| Key | Action |
|---|---|
. | Show or hide dotfiles in the tree. |
/ | Search visible entry names with a regular expression. |
gw | Label onscreen entries; type a label to select its entry without opening it. |
Ctrl-n / Ctrl-p | Select the next/previous tree search match, wrapping. |
n | Create a file; end its relative path with / to create a directory. |
d | Delete the selected entry after Delete <path>? [y/N] in the interaction line. |
m | Move to a typed path; Tab completes paths in this prompt. |
r | Rename the selected entry. |
v | Open the selected file in a vertical split. |
s | Open the selected file in a horizontal split. |
| Enter | Open the selected file in an existing pane. |
1–9 | Open the selected file directly in that numbered pane. |
| Tab | Toggle the dimmed key legend below the horizontal rule. |
Choosing a pane. With one pane, Enter, v, and s act at once. With
several:
- Pane titles are replaced by numbers from 1, top to bottom and left to right. The tree is not numbered.
- Type a digit to open in that pane, or split it. With more than nine panes, type a longer number; Enter accepts a number that is also a prefix of another.
- Escape cancels and restores the titles.
Numbers are recalculated for each request.
Changing files. Create, move, and rename apply as soon as the prompt is
submitted; Escape cancels the prompt, and there is no review stage. Delete
needs y; Enter, n, or Escape cancels. Deletion goes to the trash first.
Every operation rechecks filesystem identities and destination collisions,
refuses to overwrite, and updates affected open buffers. The safety and
non-atomicity limits of Applying changes
apply.
Jump labels replace the markers before names: one key for nearby entries, two for farther ones. Only rows visible above the legend are labelled. Escape or an unmatched key cancels and keeps tree focus.
The legend is shown by default and wraps to the tree width: n: new,
d: delete, m: move, r: rename, v: open in v-split,
s: open in h-split, Tab: legend, .: hidden files, /: search. Remapped
keys show their live spellings.
Hidden files. The tree starts with editor.show_hidden_files. The .
override belongs to this workspace’s tree and survives hiding it.
- Hiding a selected dotfile, or a hidden ancestor, selects the nearest visible ancestor.
- Revealing a file explicitly can still show a hidden path; toggling visibility clears that exception.
Tree search. / opens tree search (regex):.
- Enter selects the next matching visible name. Matching ignores case unless
the pattern uses
(?-i). - Collapsed directories are not searched.
- An empty prompt repeats the previous search, and Escape cancels without moving.
Ctrl-n/Ctrl-prepeat it;nkeeps its create action.- Tree searches do not affect buffer searches.
Quitting from the tree. While the tree is focused, :q, :wc, and
:close (and their long and ! forms) hide it and return focus to the
previous pane, keeping buffers, panes, and terminal sessions. :qa quits the
workspace as usual.
Width
The preferred width is editor.directory_tree_width: 33 columns by default,
12 to 240 allowed. Change it in Space o o or the configuration file.
| To | Do |
|---|---|
| Resize for this workspace | Drag the tree’s right border |
| Widen / narrow by 5 from the tree | :resize-right + 5 / :resize-right - 5 |
| Widen the adjacent pane by narrowing the tree | :resize-left + 5 from that pane |
Other edges behave as for ordinary panes. The tree always leaves at least 24 columns for the pane layout.
Refreshing the tree
- Listings load in the background only as directories are expanded.
- Directory symlinks are shown as links and never expanded recursively.
- While the tree is shown, expanded directories are checked every two seconds. Entries created, renamed, moved, or deleted outside Runyte appear automatically.
- The selected path stays selected while it exists; otherwise the nearest visible ancestor is selected.
- Collapsed branches and a hidden sidebar are not scanned. Expanding a branch refreshes it, and showing the sidebar resumes checking.