I've installed perlbrew and it works: when I do a 'perl -v' in a terminal, it reports 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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top