Reputation: 14370
I created the following script, by my _vimrc
is not loaded...
gvim
opens but no vimrc
NOTE: If I put the _vimrc
in %USERPROFILE%
it is loaded but this is not what I want
@echo off
set GVIMPATH="C:\Program Files\Vim\vim73"
set PATH=%PATH%;%GVIMPATH%
set MYVIMRC=U:\Work\vim\_vimrc
set MYGVIMRC=U:\Work\vim\_vimrc
set VIMHOME=U:\Work\vim
start gvim.exe
Upvotes: 0
Views: 888
Reputation: 3809
You can pass the -u
option when you execute vim
to load a custom vimrc file from wherever you want, like: vim -u C:\Windows\whatever\vimrc_files\statquant_custom_vimrc
, for example.
You can take a look on this SuperUser question, maybe it can help you.
Upvotes: 2
Reputation: 172570
What I mentioned here was wrong, MYVIMRC
apparently is read-only; one cannot use it to override the .vimrc
location. In a wrapper script, better pass the location via the -u
command-line argument:
@echo off
set GVIMPATH="C:\Program Files\Vim\vim73"
set PATH=%PATH%;%GVIMPATH%
set VIMHOME=U:\Work\vim
start gvim.exe -u U:\Work\vim\_vimrc -U U:\Work\vim\_gvimrc
Upvotes: 2