On 2011-03-28, Tim Chase wrote:
> On 03/28/2011 08:11 AM, BPJ wrote:
> >How can I make
> >
> >:!perl ...
> >
> >use the perl symlinked at ~/bin/perl
> >rather than /usr/bin/perl without actually
> >having to type :!~/bin/perl every time?
> 
> What's your $PATH set to?
> 
> You can find out what your system thinks it's set to with
> 
>   set PATH
> 
> at the command-prompt and you can show what Vim thinks it is by 
> issuing
> 
>   :echo $PATH
> 
> your ~/bin directory should precede /usr/bin in the path.  If it 
> follows /usr/bin or is absent, you need to set your path 
> accordingly (and export it if you're on *nix).  Usually you can 
> tweak this in your .bashrc, .bash_profile, or your Environment 
> Variables dialog on (win32).
> 
> In my .bash_profile it reads:
> 
>   if [ -d ~/bin ] ; then
>     export PATH=~/bin:"${PATH}"
>   fi
> 
> and in my Win32, I have a local User setting something like
> 
>   PATH=c:\users\tchase\bin;%PATH%

Or, if you want that PATH setting only when using Vim, or if you're
launching gvim from your window manager and you put your PATH
setting in a shell configuration file that's not read into your
window manager's environment, you can set PATH within your ~/.vimrc
like this:

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

(Unfortunately, :let doesn't have a ^= operator like :set has.)

Regards,
Gary

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to