pumi

File Tree

by pumi-dev

The project tree in the sidebar: folders and files with their icons and git's marks, to open, rename, move, trash and search.

filesfile-treeexplorerprojectsidebar

What it adds

Commands
toggle File Tree: show the project tree
reveal File Tree: reveal the current file in the tree
filter File Tree: search the project
Adds to
panel
Settings
9
Key bindings
1
Uses
files, processes

README

The project tree in the sidebar: the folders and files of the repository the current tab is in, with their icons and git's marks. Open, rename, move, trash and search them without leaving pumi.

pumi plugin add pumi-dev/plugins/file-tree
  • The project: the work tree's root of the tab in front (its own directory outside a repository). The tree follows you from tab to tab and keeps each project's open folders.
  • Git's marks: a new file is green, a changed one is tinted, a deleted one red, a conflict yellow, and a folder shows what is under it.
  • Icons: the Material Icon Theme (MIT), matched by name and extension the way VS Code matches them, with light icons for a light theme.
  • Search: fuzzy, over the whole project, not only the open folders (git ls-files in a repository, so ignored files stay out).
  • Files: new file or folder, rename in place, cut, copy, paste, duplicate, drag and drop, trash, delete, add to .gitignore, reveal in Finder.
  • Fast on big trees: folders are read when they open, the rows are windowed, and a build writing inside an ignored folder does not redraw anything.

cmd+shift+e shows or hides it. The palette has File Tree: reveal the current file in the tree and File Tree: search the project.

Key
click, spaceopen a file; fold a folder
right clickthe row's menu
↑/↓, ctrl+n/ctrl+pmove
→/←open or close a folder; cmd+→/cmd+← everything
enter, f2rename
cmd+c, cmd+x, cmd+vcopy, cut, paste
backspacetrash
deletedelete
cmd+fsearch
escclear the search, drop the cursor

Options

open_withwhat a click on a file does: tab (a view of its own), beside (a tab on the right), editor (your editor in a terminal tab) or system (its app)
editorthe editor for open_with = "editor": code -w, nvim, hx; empty is $EDITOR
hide_gitignoreleave out what .gitignore hides
hide_hiddenleave out dotfiles
file_icons, folder_iconsdraw the icons
git_statustint rows by git's state
auto_fold_dirsdraw a folder that holds one folder as one row, a/b/c
indent_sizepixels per level

A file opens in whichever enabled viewer fits it best, such as the Code Editor or the CSV Viewer. open_with = "editor" opens it in a tab of the Terminal plugin (pumi_dev.terminal.shell), so that needs the Terminal plugin; without it the file opens in its app.

Development

pumi plugin dev file-tree           # link it, reload on save
bun test                            # the tree, the sort, .gitignore, git's marks, the file operations

It needs git on PATH for the marks and the search.