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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.