Ananya M (RBIN/ECM1) wrote:


Hi,

I m very new to Vim. But I'm smitten by it nevertheless.

I use Gvim 7.0. I also have cygwin installed in my winnt system. Cygwin defines $HOME to a network drive and places its own .vimrc file in it.

I don’t want gvim to use this rc file since it sits on a server.
How do I force gvim to always consider the _vimrc file in $VIM?
Is there a command line or registry option?

gvim -u /usr/local/share/vim/_vimrc
or
gvim -u /cygdrive/c/PROGRA~1/vim/vimrc
or whatever

However, if I were you I wouldn't be invoking non-Cygwin gvim from Cygwin bash. If you do, you'll get no end of trouble with the different path formats required by the editor and by the shell.


-----

The gvim docs say that gvim looks for $HOME/_vimrc file first(in Windows environment).
However why is my gvim even considering a .vimrc file within $HOME?
Shouldn’t it have failed its search for _vimrc in $HOME, and moved on to $VIM to look for the _vimrc file?

gvim (for unix) looks for:

1) $HOME/.vimrc
2) $HOME/_vimrc
3) fallback, if any, as shown near the middle of the output of ":version"

gvim (for Windows) looks for:

1) %HOME%\_vimrc
2) %HOME%\.vimrc
3) %VIM%\_vimrc
4) %VIM%\.vimrc

If %VIM% is not defined outside of Vim, it first defines it, usually based on where the executable is located: e.g., "C:\Program Files\Vim\vim70\gvim.exe" will by default use "C:\Program Files\Vim" as $VIM and "C:\Program Files\Vim\vim70" as $VIMRUNTIME.

See ":help startup" (and in particular ":help _vimrc", incluting the Note) for details.


------

I tried setting $MYVIMRC to $VIM/_vimrc . But this failed, since gvim always overwrites it to $HOME/.vimrc .

------

Thanks for all your answers.

Best regards,
Ananya M

//I'm sorry to have sent this mail directly to you.
//My mailer daemon failed to deliver the mail to [EMAIL PROTECTED] .



The reason your mail didn't appear on the list is, I think, because you sent it in HTML (or rather, in both plaintext and HTML). Next time, send only plaintext: all HTML mail is discarded by the list robot, as an anti-spam measure.


Best regards,
Tony.
--
One seldom sees a monument to a committee.

Reply via email to