Tuesday, November 22, 2011

Re: _vimrc file on Windows with 7.3

On Nov 21, 5:36 pm, "John Beckett" <johnb.beck...@gmail.com> wrote:
> Ben Fritz wrote:
> >> The wiki is correct.
> >> Vim does NOT use %USERPROFILE% or %ProgramFiles%.
>
> > Sorry, John. Not quite true.
>
> > Although I don't think Vim uses USERPROFILE, it *does* use
> > the program files directory by default. If a _vimrc is not
> > found in $HOME, Vim looks it the $VIM directory, which
> > defaults to %ProgramFiles%\Vim (or whereever you install).
>
> > But the OP seems to not realize that Vim builds $HOME, if it
> > does not exist, as %HOMEDRIVE%%HOMEPATH%.
>
> > USERPROFILE is mentioned in the todo list as a good fallback
> > for %HOMEDRIVE%%HOMEPATH% but I don't think that's implemented
> > yet.
>
> It is true. As you hint above, Vim does not use
> %ProgramFiles% (and it certainly does not use %USERPROFILE%).
> Instead, it's the directory containing the Vim executable that
> may be used to construct $VIM. It's only a coincidence if that
> happens to match ProgramFiles.
>

Fair enough, I missed the subtle distinction. I suppose what I meant
was that Vim uses the *directory* pointed to by %ProgramFiles% in a
default installation, but I accidentally *said* that Vim uses the
%ProgramFiles% enviornment variable. You are correct that this is not
the case.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: