3

I usually have one tab containing the code I am working on, and another containing vimwiki. I mostly use neovim.

For the code I prefer the working directory sticking to the project root. For vimwiki I have set in the ftplugin/vimwiki.vim: lcd %:p:h. I switch the tabs with gt.

After a few edits - not immediately - in both tabs I notice the path of the "code" tab has been changed to the path of my current vimwiki page. Very annoying as the file name completion no longer gives me the project files.

Maybe I'm doing things wrong - but isn't it the main point of the :lcd command that it will leave other tabs and windows alone?

Any tips what could be going wrong? Or how I might debug this?

2
  • Is autochdir enabled? set autochdir?. I use this to ensure all buffers write to the same dir.
    – Steve
    Feb 10, 2020 at 5:15
  • no. With autochdir I do not get the desired behavior that the work dir stays in the invocation directory.
    – bdecaf
    Feb 10, 2020 at 19:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.