Syncing pwd with Fern root dir #322
Unanswered
iamvoidcoder
asked this question in
Q&A
Replies: 2 comments 16 replies
-
Maybe https://github.com/lambdalisue/fern.vim/wiki/Tips#perform-tcd-on-the-root-node-after-enter-or-leave-action would help you. |
Beta Was this translation helpful? Give feedback.
15 replies
-
I have a related question and it doesn't seem worth it to open a new topic. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
Is there an easy way to somehow auto-sync pwd with Fern's root dir? Via a custom Fern autocmd event perhaps? So that if you drill in/out in the Fern's file system tree whenever the root dir changes to automatically perform :cd <current_fern_root>?
The reason is quite simple. It is sort of hard to manually keep these two in sync. It would be much easier if e.g. after drilling in into a folder in Fern (Enter) or moving up a level (Backspace) it also changed pwd so that any relative path commands or plugins that rely on pwd (such as e.g. FZF) would work relative to the current Fern root dir.
If there is a way to somehow hook a custom script handler for the Fern root change events and obtain the current root path I can see this sorting both the pwd syncing and my other question about preserving drawer state.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions