When I'm using vim
in a terminal, it uses the PATH
I have set, and I can run programs and scripts located in my ~/bin
folder using !
For example
:! some_bash_script.sh
When I try this in MacVim, it doesnt find my personal shell scripts. How can I fix this?
I've set my shell in my ~/.vimrc
like so:
set shell=/bin/zsh
but that doesn't seem to help. I did notice that if I launch MacVim from the command line, it works as expected, i assume because the shell's environment is the environment in which MacVim ends up running in.
e.g.
$ open -a MacVim.app
Is there a better way to do this? I like launching MacVim using Spotlight, but it doesnt work if I do it that way, only via Terminal.
NOTE: This is similar to this question, but that was for vim
, not gvim
or MacVim
PATH
.$PATH
s) depending on whether it's launched as a login shell, etc.:echo $PATH
in MacVim will tell you exactly what$PATH
it's seeing, but I'm sure that won't give you additional info. You'll probably need to set your path in a shell dotfile that's read regardless of how the shell is launched.