vim is showing a different current working directory than the one I started vim with from the command-line. The problem goes away if I run without my .vimrc (vim -u NONE). How can I debug this to figure out why this is happening?
$ pwd
/Users/rbednark/Dropbox/git/quizme_personal_files/bin
$ vim --noplugin
:pwd
/Users/rbednark/Dropbox/git/quizme_personal_files/bin
:edit settings.sh
:pwd
/Users/rbednark/quizme-read-only-prod
(expected:
/Users/rbednark/Dropbox/git/quizme_personal_files/bin
actual:
/Users/rbednark/quizme-read-only-prod
)
The problem goes away if I don't use my .vimrc:
$ vim -u NONE
Notes:
:set autochdir?outputsnoautochdir:verbose set autochdir?outputsnoautochdir:!pwdand:pwdboth output the same directory- The problem also occurs with
vim --noplugin - I have recently upgraded
vimandpython(viabrew upgrade). - I have not changed my
.vimrclately (other than adding some comments). It's under version control in git, so I confirmed these have been the only changes. - I have installed and updated my plugins with vundle (
:VundleInstalland:VundleUpdate). - I have made some changes to my
.bashrcbut nothing that I think would change vim behavior. - OS: macOS Mojave 10.14.6
- vim: 8.2 (2019 Dec 12, compiled Aug 20 2020 22:44:15) Compiled by Homebrew
EDIT: I initially thought this was due to doing :edit other-file, but now I see it with just editing a single file, so I changed the above to remove that unnecessary aspect.
:edit other-fileis not necessary). I have updated the question now to reflect that. No, I don't the the other directory having any relation to the file. – Rob Bednark Aug 22 '20 at 07:07-u NONEthe problem doesn't happen, perhaps take a look at How do I debug my vimrc file? – filbranden Aug 22 '20 at 17:42