>
> 1. How do I distinguish between the command line and gui versions.
> Both appear to respond 'True' to has("gui"). Is there another feature
> that I should be looking for.

Many non-Windows versions of GUI-enabled Vim can also run in console mode.
"classical" way for a script to determine whether it is being sourced by gvim
or by Console Vim is to check has("gui_running").

Yay! Thanks for that Tony.



> 2. Where does the gui version get its initial environment from? I want
> to add some extra stuff to PATH. I know I can do this using $PATH in
> the .vimrc, but I would rather do it at some global level.
>
I don't know the answer to this one, except that it gets its environment the
same way as any other program. If Mac is sufficiently similar to Linux (both
are Unix-like OSes after all) non-login shells may get it from shell-specific
files like ~/.bashrc, ~/.cshrc, etc. (For details,see the manpage for your
shell.) (Note: Files whose names start with a dot are normally not listed in
directory listings. Use "ls -a" (possibly with other options) to make them
appear.)


I thought the same thing. But it does not appear to source my
.bash_profile or .bashrc.

Anyone out there got some clues...?

Thanks
Brett

Reply via email to