Alter $PATH in vim/macvim so as to find the right ruby binary

喜你入骨 提交于 2019-11-30 15:52:08

I don't know if it applies to zsh but depending on how it's started, bash reads some files and not others. Having this line in my ~/.vimrc ensures that $PATH is the same in Vim and in my shell.

set shell=bash\ -i

But it depends on how you start/customize your shell.

See :help 'shell' and zsh's manual.

Oliver Schupp

The answer given here worked for me pretty well:

How to use correct ruby in vim ? How to modify $PATH in VIM?

And the explanation given for the different $PATH in interactive and non-interactive mode is straightforward:

https://github.com/dotphiles/dotzsh#mac-os-x

Maybe :$PATH=$HOME.'/.rvm/rubies/ruby-1.9.3/bin/ruby:'.$PATH in your vimrc. Probably hacky, but maybe it'll work.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!