I also checked my environment variables and the command line GVim is launching the same executable as when I launch from the start menu.Įdit: the plot thickens. $VIMRUNTIME seems to be the same whether I launch from the command prompt or through other means. What is the purpose of this vimrc_example file? i can see it's read on line 2 of c:\Program Files (x86)\Vim_vimrc: source $VIMRUNTIME/vimrc_example.vim I'm fairly sure that in the past i've been able to open GVim via any method and not receive this message. Sure enough, vimrc_example.vim does not exist in the folder specified in the error message. I don't have a P drive letter mapped so this may or may not be revealing. When I exit GVim in this state then I get this error message: E138: Can't write viminfo file P:\_viminfo! When I click through the message then GVim opens in its most basic form, without reading my vimrc file. However, I receive this error message if I launch GVim by double clicking a file-type which has been associated with it, or if I launch it from the start menu. I can type gvim at the command prompt and have the program open perfectly normally. The simple solution is for me to reset the HOMEDRIVE and HOMEPATH values, but i'm most interested in why vim is displaying different behaviour depending on where it's launched from. When I launch GVim from the start menu it uses the HOMEDRIVE and HOMEPATH environment variables which are set to incorrect legacy values and so it doesn't find my vimrc file and displays error messages on launch. When I launch GVim from the command line it successfully finds my vimrc file in my home folder by using the HOME environment variable.
Hopefully it'll get through this time because i'm interested in what exactly is happening. This is a re-submission of a post that got caught in the spam filter.