Hi, Stephen,
Sounds like you have things in your .bashrc (for interactive non-login
shells--or, for some insane reason I have yet to understand,
non-interactive non-login shells when invoked by ssh) that you want in
.profile (for login shells). MacVim, like Terminal, launches a login
shell when it starts Vim instances. But for MacVim it is not an
interactive shell.
Ben.
--
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Put these environment variables in file
${HOME}/.MacOSX/environment.plist
This only works if the variables are static. Within this file no shell evaluations, and therefore no dynamic
settings, are possible.
To edit this file without a proper property file editor use on command line:
plutil -convert xml1 ${HOME}/.MacOSX/environment.plist
vim ${HOME}/.MacOSX/environment.plist
# or mvim ${HOME}/.MacOSX/environment.plist
# save
plutil -convert binary1 ${HOME}/.MacOSX/environment.plist
The syntax of this file is pretty simple:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>VARIABLE_NAME</key>
<string>VARIABLE_VALUE</string>
<key> VARIABLE_NAME </key>
<string> VARIABLE_VALUE </string>
...
</dict>
</plist>
"VARIABLE_NAME" and "VARIABLE_VALUE" of course have to be replaced with the actual variable name,
respectively it's value.
There's no quoting done for values containing space(s), i.e. no double quotes around the value, because in
this XML structure spaces already are preserved.
After a re-login the environment variables set this way should be effective. Me personally would remove them
from any shell rc file (.profile, .bashrc, .zshrc, etc) for avoiding "misbehavior"; Otherwise one might edit just
one place that sets these variables and forget about the other.
A short note at last: these variables are as of then, of course, not set when MacVim (or any other program) is
launched form Dock, but on login and inherited to the started program the normal way (i.e.: the parent makes
the child process launched inherit it's environment settings).
Hope that helps.
Regards,
Peter