Wednesday, July 11, 2012

Re: Cannot use vimdiff when started from cygwin

On Wednesday, July 11, 2012 4:49:22 PM UTC-5, Ben Fritz wrote:
> On Wednesday, July 11, 2012 10:31:32 AM UTC-5, skeept wrote:
> > > Generally, mixing Cygwin and non-Cygwin programs always causes trouble.
> > >
> > > In your case, I suspect, Vim fails to create temporary files for the diff.
> > > So please show us the output of :echo tempname() from Cygwin vim and
> > > gvim.
> > >
> > > Is this directory accessible from gvim/Cygwin vim (consider Windows can't
> > > cope with paths starting with / and Cygwin Vim can't handle Windows paths)?
> > >
> > > regards,
> > > Christian
> >
> > Hi Christian,
> >
> > the output for echo tempname() in gvim/windows is:
> > c:\htemp\tmp\VIBFED5.tmp
> >
> > while the output for gvim/windows started from cygwin is:
> > c:/htemp/tmp/VIA693A.tmp
> >
> > I use
> > if has("win32")
> > let $TMP = 'c:\\htemp\\tmp'
> > endif
> >
> > to set the name of the variable but when started from cygwin it ends up with the separators in the oposite direction /.
> >
> > Is it possible to set it in such a way that it would work?
> >
> > Thanks!
>
> Forward vs. backward slashes shouldn't matter, most Windows apps can handle both, cygwin apps can definitely handle forward slash, and a native Windows Vim can handle both.
>
> Are you trying to access "c:/htemp/tmp" from a cygwin Vim, rather than a native Windows Vim? I don't use cygwin much (and never use Vim in cygwin) but apps I do use in cygwin don't understand C:/ paths, they use /cygdrive/c.
>
> You said you were launching from cygwin with "gvimdiff.bat", is this actually true? Again, I don't use cygwin very often, but I know .bat files are scripts for the Windows cmd.exe shell, not for the cygwin shell, which uses bash or another unix shell. But maybe there is special handling built in to let it run cmd.exe scripts.


I am in cygwin and trying to use windows native gvim (I don't even have gvim in cygwin, just vim). I am using gvimdiff.bat to launch gvim with the files.
Like I said before the problem would be around the fact that any shell command started from the gvim instance launched from cygwin gives the error
/bin/bash -c "diff -v"
The system cannot find the path specified.
sheell returned 1

which means it is trying to use the bash to run these commands when it maybe should run cmd, but I don't know how to fix this.

--
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

No comments:

Post a Comment