2011-03-28 19:48, Gary Johnson skrev:
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
Problem solved. PATH and everything such was correctly set,
which was part of why I was confused (should have mentioned
that! :-) but I had made a typo in the filename of a filter
script so that the old version wasn't overwritten when I
cp'ed the new version to where I keep my filters. I thought
the strange results I got when filtering a particular chunk
of text yesterday was due to the perl 5.10 named capture bug
when in fact I was using the wrong version of the script.
Thanks to both of you anyway!
/bp
--
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