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.

I set the environment variable $VIM (on Windows) so that my
standard runtime will be used, even if I run a test version of
Vim from another directory. If I only ever ran Vim from one
directory (which is in practice what happens almost all the
time), I would not have to set $VIM as it would be inferred from
the directory holding the Vim executable (which is nowhere near
ProgramFiles on my systems).

John

-- 
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

Reply via email to