开发者

correct perl path for vim

I've installed perlbrew and it works: when I do a 'perl -v' in a terminal, it rep开发者_StackOverflow中文版orts that I'm using perl 5.14. But gvim (vim instead works) still thinks that I'm using 5.10...

How do I set the perl path for gvim?

thanks


You can set the PATH variable in .vimrc:

let $PATH = "~/bin:" . $PATH 

You can take a look at what it is by

:echo $PATH


There's also trick to enable path defined by perlbrew, so you don't need to change your .vimrc once you switched to other perl version:

" Enable perlbrew path
if has("gui_running") && filereadable($HOME . "/perl5/perlbrew/etc/bashrc")
  let $PATH=system("source " . $HOME . "/perl5/perlbrew/etc/bashrc; echo -n $PATH")
endif

Put this code in your .vimrc and restart vim

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜