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

后端 未结 7 899
别那么骄傲
别那么骄傲 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:22

    I don't use mac or zsh (I am on linux), however I ran into this problem when I ran gvim from the MATE Menu.

    I solved it by adding this to my .vimrc:

    if $PATH !~ "\.rbenv"
        let $PATH="/home/username/.rbenv/shims:/home/username/.rbenv/bin:" . $PATH
    endif
    

    This avoids setting it if you run vim from a terminal, otherwise the rbenv paths would be included twice.

    I tried setting the application to run via a terminal, but that didn't help.

    0 讨论(0)
提交回复
热议问题