This question already has an answer here:
I have an absurd problem. Honestly, I have a hard time figuring out whether this belongs here or a Windows forum.
Using Vim on Win10, I've changed my
C:\Program Files (x86)\Vim\_vimrc from the awful default that came with the installation to my own. For simplicity's sake, let's say the file was
" _vimrc (default) colorscheme blue
and I changed it to
" _vimrc (custom) colorscheme desert
Now, when I run
vim in cmd or powershell, the colorscheme is "desert", and
:e C:\Program\ Files\ (x86)\Vim\_vimrc opens the custom file as I would expect. But here's where it gets weird: If I try to use the file from any other program (
gvim), it's still the default file, and it's marked as read-only. And when running
gvim, it uses the "blue" colorscheme.
My first thought was that vim was working on some temporary file, but the changed file persists over program restarts and even a reboot. Is there two files by the same name? How does Vim load different files than gVim?
The output of
:scriptnames has the exact same first line in both Vim and gVim, "
C:\Program Files (x86)\Vim\_vimrc".