You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I notice helix comes with a file manager mode (<space>f or <space>F). This fuzzy finder file search seems like a cool idea, but it's not the priority focus for the editor. I notice there are projects like lf and broot. Any good setups you guys could share to get a sidebar with a file manager along with helix in one terminal window?
I feel like it'd be out of scope to improve the file-search feature because helix is a post-modern code editor (key word is "editor"). But if we consider modal a editor as being just a mode to a shell which you enter as soon as you type the command hx, then perhaps modal editing isn't the problem we developers really need solved. It would seem, a modal shell really does what we need when it comes to editing files. An editor edits files, so file-picking is very much in the scope of what a modal editor does. A editor may delete from a file, or move edits across files, which is really a multi-file operation which is typically done within a shell. So my point is, what if helix was all you needed after you enter your shell (you'd never need to exit helix). What exactly am I talking about?
Well, if you had a File mode which displays files in an active directory (like broot), buy while in this mode, you'd have commands:
j - move to the next file down
k - move to the next file up
h - go up a directory
l - open directory or file in the right buffer
These commands are pretty identical to how lf works.
/ - fuzzy search file name breadth-first and ordered by best-match (e.g. searching "foo" will show "food.txt" before "follow.txt")
? - fuzzy search file contents breadth-first
: - run shell command in current directory (Prompt mode)
c - change file name
y - copy file to default register
p - paste file
d - send file to trash
u - undo last file change
U - redo file change
These are some ideas for the commands in file mode. You could edit the file with l which will create a vertical split window with an edit buffer to the right of the directory window (keeping the directory buffer as a sidebar window; 1/3 or 1/4 terminal width) and this will set you in Normal mode. You can yank text while in normal mode, and switch back to the files window with C-w h (or h in Window mode), open another file, and paste the text there just like you would when you switch buffers in helix today.
This additional File mode for a window buffer would be more familiar to the experience you'd get in editors like VS Code or Sublime Text. It's essentially borrowing ideas from lf and broot and applying them to the file picker mode which would get its own window buffer.
I like how lf keeps a maximum of three vertical window splits open with the current directory in the center, the top directory on the left, and the preview on the right. This view would be ideal when you have no file buffers open. As soon as you open a file buffer, the left parent-directory preview and right file preview windows would be closed and the 1/4 window of the current directory and 3/4 window of the opened file would appear until you quite the file window with :q.
Being able to navigate and manage files from File mode would be idea for traversing a project's file, popping in and out of the files to edit as needed. But also, it's a mode where you can run shell commands with :, or what I'm calling Prompt mode. When in Prompt mode, the file preview (right most window) would be replaced with a command line at the bottom and output buffer above like you would expect in a regular shell. You could access this mode from within a Normal mode, I imagine, but I don't know what the correct key strokes should be to get you there. This mode could also have it's own window space and buffers if we introduce tabs into helix! The possibilities are endless.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I notice helix comes with a file manager mode (
<space>f
or<space>F
). This fuzzy finder file search seems like a cool idea, but it's not the priority focus for the editor. I notice there are projects likelf
andbroot
. Any good setups you guys could share to get a sidebar with a file manager along with helix in one terminal window?I feel like it'd be out of scope to improve the file-search feature because helix is a post-modern code editor (key word is "editor"). But if we consider modal a editor as being just a mode to a shell which you enter as soon as you type the command
hx
, then perhaps modal editing isn't the problem we developers really need solved. It would seem, a modal shell really does what we need when it comes to editing files. An editor edits files, so file-picking is very much in the scope of what a modal editor does. A editor may delete from a file, or move edits across files, which is really a multi-file operation which is typically done within a shell. So my point is, what if helix was all you needed after you enter your shell (you'd never need to exit helix). What exactly am I talking about?Well, if you had a File mode which displays files in an active directory (like broot), buy while in this mode, you'd have commands:
These commands are pretty identical to how
lf
works.These are some ideas for the commands in file mode. You could edit the file with
l
which will create a vertical split window with an edit buffer to the right of the directory window (keeping the directory buffer as a sidebar window; 1/3 or 1/4 terminal width) and this will set you in Normal mode. You can yank text while in normal mode, and switch back to the files window withC-w h
(orh
in Window mode), open another file, and paste the text there just like you would when you switch buffers in helix today.This additional File mode for a window buffer would be more familiar to the experience you'd get in editors like VS Code or Sublime Text. It's essentially borrowing ideas from
lf
andbroot
and applying them to the file picker mode which would get its own window buffer.I like how
lf
keeps a maximum of three vertical window splits open with the current directory in the center, the top directory on the left, and the preview on the right. This view would be ideal when you have no file buffers open. As soon as you open a file buffer, the left parent-directory preview and right file preview windows would be closed and the 1/4 window of the current directory and 3/4 window of the opened file would appear until you quite the file window with:q
.Being able to navigate and manage files from File mode would be idea for traversing a project's file, popping in and out of the files to edit as needed. But also, it's a mode where you can run shell commands with
:
, or what I'm calling Prompt mode. When in Prompt mode, the file preview (right most window) would be replaced with a command line at the bottom and output buffer above like you would expect in a regular shell. You could access this mode from within a Normal mode, I imagine, but I don't know what the correct key strokes should be to get you there. This mode could also have it's own window space and buffers if we introduce tabs into helix! The possibilities are endless.Some ideas.
Beta Was this translation helpful? Give feedback.
All reactions