Skip to content

When exploring a project, I want to pick a directory to cd into using a picker #13368

@marc-thieme

Description

@marc-thieme

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:

  1. Open the file explorer and look around the directories
  2. When I have found a directory which seems relevant, I want to cd into that directory and continue exploring.
  3. Then, I often switch between file picker and file explorer to explore the directory further. In this case, it is important that the picker open in the directory where I just 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, which cds 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions