When exploring a project, I want to pick a directory to cd
into using a picker
#13377
Replies: 4 comments
-
Of course this is only relevant for directories which don't have any files. Otherwise, I could just pick any file and continue as in the "buffer is directory"–approach |
Beta Was this translation helpful? Give feedback.
-
I an not a fan of making Helix does not use the CWD for much and for many things intentionally uses the workspace/repo root (and the model is generally 1 helix instance/workspace). |
Beta Was this translation helpful? Give feedback.
-
Use Case and MotivationScenario: I just downloaded a big project from GitHub which I don't know yet. I want to walk through the directories. Currently, I don't know a way to do this conveniently with helix.
If there was a file next to If such a file to select doesn't exist, I don't know a way to do this focus–based workflow. Proposed SolutionsI am going to ditch the In the following, I copy the alternative solution I suggested:
Example
After opening, it first opens an empty buffer which represents a file in the current directory.
And from there, I can use
Therefore, I now achieved a way to focus the directory I wanted. |
Beta Was this translation helpful? Give feedback.
-
We recently added that file explorer which can help eith workflows like thag. In the future we likely want to allow you to define a directory to pass to the file picker yourself. Abusing the CWD for this is not really something I think we should do and I don't want to add features for that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, the only way to change the working directory is using the
cd
command.This works well when I already now which directory I want to change into.
However, when I am exploring a project, I like the following workflow:
cd
into that directory and continue exploring.cd
'd into. Otherwise, there is either too much noise or I don't see all files that I am interested in when I'm in any other directory.There are a few solutions to this problem. Using
cd
was just the easist to explain in the title:Have a
.
option in the file explorer which opens a new buffer that is the directory selected in the file explorer.→ Then, I could use
file_picker_in_current_buffer_directory
to open the file picker in that directory.The buffer that is the directory could just be a buffer opening a new file inside the directory named
.
or named the same as the directory.If the file is made read-only, it also couldn't be written and accidentally create an actual file.
This has the additional advantage that I could have multiple open directories at the same time between which I could switch just by switching the buffer.
The disadvantage is that opening a file would change the directory where the file picker is opened in this way. Actually switching the working directory would mean that I could use
file_picker_in_current_directory
no matter what buffer I have focused.Alternatively, there could be a dedicated
cd
–picker and/or –explorer, whichcd
s into the directory picked.Or there could be a
cd
–option in the current file explorer, perhaps represented by the aforementioned.
.The essence of this feature request is having a more exploratory and quick interface for the
cd
command (or the alternative solution with the "buffer is directory"–approach).Beta Was this translation helpful? Give feedback.
All reactions