On 2010-04-12, esquifit wrote:

> On 12 Abr, 08:00, Gary Johnson <[email protected]> wrote:
> > On 2010-04-11, esquifit wrote:
> > > I'm using gVim under Windows XP and set cygwin's bash to be the shell
> > > enviroment for gVim.
> >
> > [...]
> >
> > > In other words, seems that system correctly expects cygwin syntax
> > > but filereadable() still expects Windows native paths.
> >
> > > Is this an inconsistency, or am I missing some obvious point? Is there
> > > any better way to deal with this situation?
> >
> > What you're missing is that the Vim you're using interfaces with the
> > Windows OS primarily via the Windows OS API, which expects
> > Windows-style path names, whereas the system() call uses the shell
> > to interface with the OS, and you've specified Cygwin bash as your
> > 'shell', which expects Cygwin's Unix-style path names.
> >
> > If you use a Windows gvim and a Cygwin shell, you have to manage
> > these path name differences.  A number of people on this list have
> > come up with partial solutions but none of them have worked
> > seamlessly enough to suit me.  My solution is to use a Cygwin vim in
> > a terminal when I need to use Vim with Cygwin tools and to use a
> > Windows gvim when I need to use Vim with Windows tools.

> Thank you for your swift reply. The point you explain below, namely
> that filereadable() is part of the interface with the underlying OS
> and that system() talks to the configured shell, was already apparent
> to me. What I wanted to know was whether this was "intentional" or
> not.  I understand that there is a natural logic in it, on the other
> hand it leads to asymmetric situations like the one I described. I can
> live with a workaround though. :)

Maybe I still don't understand the question then.  It's only
asymmetric in your case because you made it so by specifying a
Cygwin shell.  I guess it's intentional that Vim allows
customization to the point that the user can create odd situations
for himself if he so chooses.

> Regarding the suggestion of using cygwin vim in a terminal, I'd love
> being able to do it, but unfortunately the (binary) cygwin
> distribution of vim lacks a number of features (present on gVim) which
> I absolutely need, and I don't have currently the knowledge nor the
> time to attempt to understand how to compile my own version.

I understand the time concern.  It's pretty easy to do, though,
whether you use the source from Cygwin or from Vim's Mercurial
repository.  The only tricky part I found was getting the right
development libraries for the dependencies.  Just let us know if you
want to try.

Also, the convention on this list is to bottom-post.

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to