Netrw-ish File Explorer Today #9067
Replies: 2 comments 12 replies
-
Here is a recording of usage of the yazi file explorer. It's actually quite a lot better than netrw given the live preview. zed-yazi-720.mov |
Beta Was this translation helpful? Give feedback.
-
Maybe a CLI argument for |
Beta Was this translation helpful? Give feedback.
-
The builtin file drawer in Zed is quite capable and the default vim keymap can make it act somewhat similar to netrw. Hitting
-
will open the drawer at the location of the current file and you can move up and down withk
andj
and such.At the same time, I still find it jarring to look to the left rather than within the current pane I'm focused on. Additionally, when the drawer opens you see the entire hierarchy. Sometimes I can't immediately see where I'm at in the tree.
For those reasons I'm still a big fan of the netrw-ish experience where you open an in-pane directory browser at the current file location and can navigate from there. I used https://github.com/tpope/vim-vinegar in vim and then https://github.com/danprince/vsnetrw in vscode to approximate.
There is no builtin way to do this in Zed but... leveraging the builtin terminal and a custom keybinding can now get us most of the way there.
This does the following:
c r p
ends up as "Copy Relative Path")This opens the yazi terminal file manager at the location of the current file. You could use any file manager of course (lf, nnn, etc).
While this doesn't carry exactly the same design style as Zed it goes without saying that it is really good at file management. It also has a really good file previewer. I can't quite get image previews to work inside Zed presumably because of Alacritty limitations, but that's okay.
Regardless of the file manager you use, opening a file will create a new tab in the same pane in Zed. That's pretty okay though I'd typically rather have it open in the same tab or at least close the file manager tab. You do end up with some extra tabs. If we eventually have a tab-less Zed option perhaps this problem goes away though.
Anyway, thanks to the Zed team (@osiewicz , @ConradIrwin , @SomeoneToIgnore and more) for continuing to unlock workflows. Just the last couple releases with
SendKeystrokes
and tasks have really opened things up.Beta Was this translation helpful? Give feedback.
All reactions