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 find it tedious to switch between helix and the terminal to create new directories and files. Add a new picker menu which shows only directories in the list, but opens a new file at the location when you select. For example, entering this picker while within the helix repo with an empty search would yield this:
The default config would open with the parent of the current file already selected. i.e.: if you enter the picker while editing helix-term/src/ui/picker.rs, then the picker's initial state would look like this:
| helix-term/src/ui/
> helix-term/src/ui/
Implementation
I've scoped this out a bit but don't feel confident enough in my understanding of the helix_term::ui::Picker struct to implement this. It looks like Picker only permits selection of matches, and does not allow the user to select a non-existing file for FilePicker. I think changes would need to be made to Picker to allow non-matching paths to be sent to the callback_fn. Possibly this could be implemented as an new option that defaults to false so as to not break current pickers.
This discussion was converted from issue #1753 on April 07, 2024 00:50.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
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
-
Request
I find it tedious to switch between helix and the terminal to create new directories and files. Add a new picker menu which shows only directories in the list, but opens a new file at the location when you select. For example, entering this picker while within the helix repo with an empty search would yield this:
where the
|
is text entry box and the>
is the cursor.While entering a name without a path separator at the end, it would filter the directory names:
After entering a directory name with a path separator, it would look like this:
Pressing enter while in this state would make any parent directories and open the file:
Pressing enter while in this state would populate the picker text entry box with the selection under the cursor:
would yield:
The default config would open with the parent of the current file already selected. i.e.: if you enter the picker while editing
helix-term/src/ui/picker.rs
, then the picker's initial state would look like this:Implementation
I've scoped this out a bit but don't feel confident enough in my understanding of the
helix_term::ui::Picker
struct to implement this. It looks likePicker
only permits selection of matches, and does not allow the user to select a non-existing file forFilePicker
. I think changes would need to be made toPicker
to allow non-matching paths to be sent to thecallback_fn
. Possibly this could be implemented as an new option that defaults to false so as to not break current pickers.Beta Was this translation helpful? Give feedback.
All reactions