Brett Calcott wrote:
Hi all,

I have just got a Macbook (switching from windows) and have downloaded
and compiled the latest version of Vim on it. It all works fine, but I
have a few questions.

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. The "classical" way for a script to determine whether it is being sourced by gvim or by Console Vim is to check has("gui_running").


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.

Thanks for any aid,
Brett


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.)


Best regards,
Tony.

Reply via email to