I've run into a weird problem with Vim on Win8 that I just can't get my head around. Some of the stuff I'm going to mention happened months ago and therefore aren't fresh in my memory anymore, so please forgive me if I accidentally leave things out or can't be definitive on some details.
So several months ago, while looking into combining Vim and LaTeX, I discovered LaTeX-Suite (or Vim-LaTeX). When installing this plug-in, one is instructed to set a few things in one's
_vimrc file. I did this and added just a few settings of my own. I was going to add more as I went along but I got distracted from Vim and now here we are.
Anyway. I'm pretty sure I did all this in the commandline, which I think is relevant to my problem, because I've now discovered that the contents of my
_vimrc file depend on the manner in which I open it. In particular, those lines I added a couple months ago, are missing from the file if I open it with gVim (regardless of whether I use the context menu or launch gVim from the commandline). Same song for any other graphical text editor. Only if I open it with Vim from the commandline, the lines are there.
What is going on here? Are these lines somehow trapped in Vim limbo? Do I need to call the Ghostbusters? How can the same file have different contents depending on the text editor?
I FOUND A CLUE!
In trying to determine which file was being copied depending on whether I did so from the commandline or from the context menu in Windows Explorer, I found out a crucial detail.
In order to copy files in the Program Files (x86) folder, one needs to run
cmd.exe as admin. I discovered that my extra lines in the
_vimrc file were absent if I opened it with Vim in an admin commandline. So copying as admin copies the file with the limited contents, copying it without admin rights (to the Documents folder for example) will copy the file with the extra lines. Still weird (because I don't have admin rights when I simply open the file with gVim from the context menu) but at least this sheds some light on the underlying cause. Is anyone able to connect the dots for me?