Wolfgang Schmidt wrote:
Hi,
to me it's no clear what you mean by "prevent Vim from going to my Home
directory". I'm using Vim on windows, too, but he never asked me for a
HOME directory. Instead, the _vimrc file is kept in $VIMRUNTIME, which
by default on XP is C:\Programme\Vim\vim70. Therefore, all you have to
do is to put
your _vimrc there and all should work fine.
Cheers
Wolfgang
No it won't.
1. If $HOME exists, Vim will look first for $HOME/_vimrc and $HOME/.vimrc ;
and if neither is found, it will look for $VIM/_vimrc and $VIM/.vimrc . $VIM
is normally set (on Windows) to C:\Program Files\Vim so if you put your _vimrc
in $VIMRUNTIME (aka $VIM/vim70), not only it won't be found, but the $HOME
directory (which, on the OP's system, is on a slow remote disk) will be
accessed twice. It is these accesses to the remote disk that the OP wants to
avoid -- one way to do that is to set $HOME to something on C:\ -- for
instance $USERPROFILE which is a user-private directory -- _before_ the user
vimrc is looked for, i.e., either by means of a -cmd argument on the
command-line, or by a command in a "system vimrc" named $VIM/vimrc (with no
dot or underscore).
2. On a multiuser system like the OP's seems to be, $VIM and $VIMRUNTIME are
common to all users, so putting the _vimrc there will force all users to use
the same vimrc, something usually not desired.
3. Anything in $VIMRUNTIME or under it can be silently replaced by any
upgrade; and the whole tree will be rebuilt under a different name by a
version upgrade (e.g. $VIM/vim71 for Vim 7.1). For that reason, users should
avoid placing anything there, other than files distributed together with Vim.
Best regards,
Tony.