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

后端 未结 7 935
别那么骄傲
别那么骄傲 2020-12-14 04:41

I use plain Vim with ruby support on Lion (installed by gist). I am using ruby with rbenv so my path looks like /users/me/.rbenv/shims:.....

From within vim the pat

7条回答
  •  北海茫月
    2020-12-14 05:18

    I did'n t set the shell option in .vimrc, so that it was automatically set to /bin/zsh.

    Then I found out that I hab a dublicate initialisation of rbenv: in my .zshrc. I removed the initialisation end $PATH extensioin in .zshrc because that was already handled by the oh-my-zsh rbenv plugin.

    Even after that cleanup, the $PATH mangeling still happening so :!echo $PATH

    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/fb/.rbenv/shims:/Users/fb/.rbenv/bin:/Users/fb/bin:/usr/local/sbin:/usr/games

    Setting :set shell=/bin/bash was what helped me, as i can live with bash in my vim: :!echo $PATH

    /Users/fb/.rbenv/shims:/Users/fb/.rbenv/bin:/Users/fb/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/Users/fb/Dropbox/local/bash

提交回复
热议问题