What operating system? What window manager? Etc.
How are you starting gvim?
Does logging out and back in (or restarting) help?
Vim inherits its environment from whatever started it. If you start it
from your desktop, where does your desktop get its environment from?
Whatever started that. Quite possibly your login shell. But its stuff
got set when you logged in, so it won't take effect until you log out
and in again.
If you provide more specifics though, someone can probably give you more
specific assistance (probably not me as I'm on a Mac, so it's quite
different!).
Ben.
On Linux, your desktop gets its environment from the window manager you
selected (or defaulted) at (graphical) login time, totally bypassing
bash. I'm not sure where the winmanager inherits its environment from --
probably from init I think. Depending on which winmanager you are using,
it may or may not be possible to configure it to set some user-defined
settings at login time (I use kdm and I haven't found any place to set
such settings).
To set some particular settings just for Vim, you can always set them in
your vimrc, of course.
Best regards,
Tony.
--
Military justice is to justice what military music is to music.
-- Groucho Marx
Your bashrc is read by bash when it starts in interactive mode, so
it was read by the instance of bash running in your terminal. If
you launched gvim from the command line, it would see the same
environment that your vim sees.
You are probably launching gvim from your window manager, which gets
its environment from a number of places, but not from your bashrc
since your window manager was not run from bash.
Stuff like PATH and other environment settings that you expect to be
seen by applications launched from your window manager should really
be defined in your ~/.profile instead of in your ~/.bashrc. Your
~/.profile is read when you log in, whether through X or through a
terminal. Environment settings (but not aliases) made there and
exported will be seen by all your processes. Your ~/.bashrc should
really be used to make only those settings that you expect to use
only from the command line (including aliases and functions) or by
applications launched only from the command line.
HTH,
Gary