Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a directory should change directory #2617

Closed
cjohansson opened this issue May 30, 2022 · 7 comments
Closed

Opening a directory should change directory #2617

cjohansson opened this issue May 30, 2022 · 7 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@cjohansson
Copy link

Describe your feature request

Background: I would like the ability to quickly switch working directory, I feel like helix just like vim/vi/neovim places too much emphasis on where I was in the shell when I initially started the editor. I would like to be able to have a helix session on for the entire day / days and switch filesystem contexts as needed. (Ideally I would to like have different current working directories for different buffers but that is another feature request.)

When opening a directory with the command :open the current working directory should change to the specified location and the file picker for the directory should be displayed. At the moment I get a OS error and the specified path is cleared.

This would be similar to how Emacs does C-x C-f and then pressing C-d in a directory to enter dired-mode for the specified directory

@cjohansson cjohansson added the C-enhancement Category: Improvements label May 30, 2022
@kirawi
Copy link
Member

kirawi commented May 30, 2022

You can use :cd to change the working directory. I agree that a file picker should open if you :open to a directory.

@kirawi kirawi added the A-helix-term Area: Helix term improvements label May 30, 2022
@weakphish
Copy link
Contributor

I'd like to give this a shot, if that's okay?

@the-mikedavis
Copy link
Member

the-mikedavis commented Jun 2, 2022

The file picker popping up when you :open a directory seems like a nice win (see also #2558), I'd say go for it 🙂

In my opinion :open shouldn't also :cd you though, I would prefer those be separate operations. Something like #2056 could combine the :open and changing the cwd

@weakphish
Copy link
Contributor

weakphish commented Jun 4, 2022

@the-mikedavis would you mind assigning the mentioned issue to me? Thanks!

@the-mikedavis
Copy link
Member

Could you add a comment to the issue you'd like to work on? GitHub only lets me assign members and issue participants (author or commenters)

@alexxbb
Copy link

alexxbb commented Oct 2, 2022

I'd very much like to see this implemented in Helix. I use :e . in Vim all the time to quickly inspect different folder in my project.

@pascalkuthe
Copy link
Member

Opening a directory with :o was implemented in #2707. I don't think we will change the cwd so I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

6 participants