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

Is it possible to select a directory to be neovim cwd within vifm? #86

Open
satishskamath opened this issue Feb 21, 2023 · 3 comments
Open

Comments

@satishskamath
Copy link

No description provided.

@xaizek
Copy link
Member

xaizek commented Feb 25, 2023

No, but it probably won't be hard to add.

@satishskamath
Copy link
Author

Sorry for the really late reply @xaizek .
I was wondering how this can be approached? I thought of 2 functions and I am not sure if this can already be achieved in some way other than vifm or default netrw has something built in for this:

@xaizek
Copy link
Member

xaizek commented Feb 9, 2024

Yes, need to use result of --choose-dir, specifically feed it into :cd or :lcd. The catch though is that plugin's code is a mess. Code-wise:

  1. In s:StartVifm and s:HandleRunResults.
  2. Need to check cd for editcmd parameter and upon detection, pass --choose-dir instead of --choose-files.
  3. s:HandleRunResults should do exec cd <path> after checking that there is only one path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants