53860Re: vimrc on windows
- Sep 29, 2004Hi Antoine,
I have the following configuration:
o Windows XP, vim63
o The whole vim distribution for _all_ users is in
o The vim installer has put some BAT file to %windir%
o Every user that wants to use vim has to create an _empty_
directory, for example in %USERPROFILE%\Application Data\vim,
copy the _empty_ vimfile tree and the two files myvimrc.vim and
mswin.vim in it.
o $VIMRUNTIME is set by the Administrator to %ProgramFiles%\vim\,
$VIM has been set by individual users to the path of her/his
directory (but every user is free to let $VIM undefined so
vim can figure it out by itself).
Now you pretend it would be better to do the following:
o No BAT-file in WINDOWS (this is a matter of taste, but in
principle I agree with that).
o Put (g)vim.exe into the PATH environment variable
o Let vim figure out $VIM and $VIMRUNTIME by itself or
set $VIM=%ProgramFiles%\vim\ and let vim figure out $VIMRUNTIME.
o Put the personal _vimrc into %USERPROFILE% (that is mapped to
$HOME by vim). I can then put my myvimrc.vim and mswin.vim where
I want ant source them from within _vimrc.
o Put an _empty_ vimfiles tree into the directory %USERPROFILE%.
Ok - I didn't tried out that, but in my oppinion, as far as I
understood the documention you recommended me to read, this should
work. The only weak point is that with Windows XP all configuration
files are normally stored under
"%USERPROFILE%\Application Data\<<Program Name>>"
and _not_ directly under %USERPROFILE%.
In the documentation a additional environment variable $VIMINIT was
mentioned. Is it in your opinion allowed to
set VIMINIT=%USERPROFILE%\Application Data\vim ?
Now to the arguments: I belief that I have found the only way to
store vim's configuration file in a way that is usual under Windows
XP without the need of changing vim's sources. Until yet, nobody has
proved me that with my configuration something doesn't work.
To your arguments:
> Later you see that Vim normally figures out $VIMRUNTIME withoutAs mentioned above, I do not have any file twice on my system: Every
> your help. I find it wasteful to have to copy the wholo
> distribution to as many different places as there are users on a
> system (since typically, the sysadmin will want to make Vim
> available to all of them). Just imagine a large university with a
> different $HOME for every student (also teacher, etc.)!
user has his own configuration files, that's all. She/He doesn't
even need to copy the empty vimfiles tree, because vim looks up the
$VIMRUNTIME if it doesn't find a 'runtime' file under $VIM.
> Vim doesn't use many files in $HOME, except those on or underYes, but not to
> $HOME/.vim or $HOME/vimfiles, which is vim-specific, and, on XP
> and similar, amounts to %USERPROFILE%\vimfiles aka
Ok -- I think I could live with your configuration, now that I am
understanding it, but I am just happy with the mine too. And its
file structure fits better in the Windows XP directory tree.
> you can keep the BAT files; but they arent 100% to my taste.Yes, They are also not 100% my taste. If I once will install (g)vim
without an installer, I won't create BAT-Files, but use the PATH
>> But anyway: If you can give me an example of something that doesn'tAs mentioned: I have vim installed at only one place, so as long as
>> work with my (certainly non standard) configuration, then I will
>> belief you ;-) I am just happy with my vim environment at the
>> moment :-)
> The example is further up (a large university) but it hits in a lesser
> degree every multiuser installation: having what amounts to a full Vim
> distribution repeated under each user's HOME directory is (1) awkward if
> there are many users, and (2) it makes upgrading more error-prone since you
> have to update the distribution for each user instead of updating it
the vim scripting language of the old configuration files within the
user directory trees can be interpreted by new born vims, I don't
see any waste neither in disc space nor in my administrativ work.
But anyway, as soon as I find something that does not work because
of my way to use vim, I will switch to your method. Thanks for your
- << Previous post in topic Next post in topic >>