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

:bdelete does not trigger lcd #59

Open
phgz opened this issue Apr 18, 2023 · 2 comments
Open

:bdelete does not trigger lcd #59

phgz opened this issue Apr 18, 2023 · 2 comments

Comments

@phgz
Copy link

phgz commented Apr 18, 2023

Good day to you,

When closing a buffer via :bdelete, the lcd command does not trigger due to the autocmd being { "BufNewFile", "BufRead" }. Would it cause problems if it were BufEnter (like as in vim-rooter) instead of BufRead?

Regards.

@cljoly
Copy link
Owner

cljoly commented Apr 19, 2023

Thanks for opening this issue!

To clarify the expected behavior here, let’s say you have two buffers, A and B. You want lcd to run in buffer B after you have :bdelete in buffer A, is that correct?

Would it cause problems if it were BufEnter (like as in vim-rooter) instead of BufRead?

I don’t think it would cause problems, that’s a good idea!

@phgz
Copy link
Author

phgz commented Apr 19, 2023

That is exactly the expected behaviour! From what I have tried, making that change seems to be resolving the issue. I am also planning on making a PR to add a feature (switch between opened projects), which would also rely on that.

cljoly added a commit that referenced this issue May 21, 2023
* Fix default settings that were improperly set
* Use wider autocmd events (fixes #59) for `lcp`
    * add rooter integration (if vim-rooter is present, it’ll be
      reconfigured to play nicely with telescope-repo)
cljoly added a commit that referenced this issue May 21, 2023
* Fix default settings that were improperly set
* Use wider autocmd events (fixes #59) for `lcp`
    * add rooter integration (if vim-rooter is present, it’ll be
      reconfigured to play nicely with telescope-repo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants