This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: using cygwin's Perl from within gvim


Hallo Igor,

>>> I am unable to use Perl from within gvim. For example, if within
>>> gvim, I type
>>> Esc :%!perl -p -e 's/public/private/;'   and hit return,
>>>
>>> nothing happens, where as if I issue this exact same command


> AFAIK, the temporary file management is done by gvim itself, and it simply
> execs the program, pipes the file to it, and redirects the output into a
> temp file (i.e., from perl's point of view, it's just a filter
> invocation).  I suspect the problem is with argument quoting and/or
> finding the right perl executable.


> On Wed, 22 Oct 2003, Gerrit P. Haase wrote:

>> You cannot use Cygwin Perl from within an Windows application, try to
>> use ActiveStates or another native Windows Perl, or use Cygwin Vim/Gvim.
>>
>> Gerrit

> That is plainly not true (sorry, Gerrit).  While trying ActivePerl is a
> good suggestion, you *can* use Cygwin apps from non-Cygwin programs as
> long as you're careful about paths and argument quoting.  I'd suggest
> trying something like

Yes, of course you're right, but I don't do it and I cannot support
it.  If I sit down to figure out what is going on (I even have no Gvim
installed) then the half day is over and I have no interest to support
Gvim problems.  It is a Windows App and if someone should support it
then IMO the Gvim people.  And yes I didn't tell him in the first, my
bad. 


> ESC :%!c:\cygwin\bin\bash --login -c "perl -pe 's/public/private/;'"

Maybe your first hint was correct, just a matter of the PATH setting?

> to make sure the right perl is found and the arguments are properly quoted
> (the --login ensures you have the right PATH).  Alternatively, you could
> try setting the "shell" variable within gvim to "c:\cygwin\bin\bash".  If
> "c:\cygwin\bin" is in your system PATH and you don't have other bashs or
> perls installed, you can probably omit the "c:\cygwin\bin" and "--login"
> bits.
>         Igor
> P.S. What does this discussion have to do with XFree86, BTW? ;-)

It is OT, like it is when people are asking how to use sed regex on
the main list;-)


Gerrit
-- 
=^..^=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]