I saw something strange happen today.
I was in directory
/some/path/ and opened a file with
I then did :pwd in vim and it gave me
/some/other/path. What could cause this to happen?
:verbose set autochdir? outputs
set autochdir in
~/.vimrc doesn't solve it.
I tried this:
This is the behavious I expect (
:pwd returning the directory in which I launched vim) so I don't understand why for one particular file it doesn't work like that.
I figured it must be somehow caused by It is definitely caused by these lines in
autocmd BufWinLeave * mkview
autocmd BufWinEnter * silent loadview
I deleted my
:pwd returned the correct directory.
After I restored it, the situation reverted to the original problem. I still don't understand how it happenned, I can't recreate the issue.