Tuesday, April 29, 2008

Vim and Windows

This is just a note for those who are searching the web...

So, today I was on someone else's machine, and noticed he used "File -> Open" from gVim... and I never do that!  I just right-click and say "open with vim".

"Well," he explained, "when the file I'm opening is on the network, I don't get my _vimrc loaded".

This has never happened to me on my machine, so we looked into it.  Turns out that gVim loads _vimrc from your %HOME% environment variable, but it does so from whatever drive your file is in.  My %HOME% was specific about C:\, and his--actually just a reference to %HOMEPATH%--had no drive designation.  When we added it, all was well.

The error message we were getting only came up when you quit gVim, and was something along the lines of "can't write _vimrc" or some-such.

No comments: