public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* vim doesn't quite get backslash-separated paths right
@ 2002-04-19 13:42 Chris Metcalf
  2002-04-22  1:08 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Metcalf @ 2002-04-19 13:42 UTC (permalink / raw)
  To: cygwin

If you run vim with "c:\temp\foo" it complains

  E303: Unable to open swap file for "c:\temp\foo", recovery impossible

However, it then manages to correctly write the file out to the indicated
path.  Looking at strace shows it trying to open a file named
/tmp/c:\temp\foo.swp; it thinks the whole path is a relative name in the
current directory.

This is a problem if you set $EDITOR to vim and then have non-Cygwin 
programs invoke vim.

                Chris Metcalf -- InCert Software -- 1 (617) 621 8080
                metcalf@incert.com -- http://www.incert.com/~metcalf


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vim doesn't quite get backslash-separated paths right
  2002-04-19 13:42 vim doesn't quite get backslash-separated paths right Chris Metcalf
@ 2002-04-22  1:08 ` Corinna Vinschen
  2002-04-22 11:36   ` Chris Metcalf
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2002-04-22  1:08 UTC (permalink / raw)
  To: cygwin

On Fri, Apr 19, 2002 at 04:41:34PM -0400, Chris Metcalf wrote:
> If you run vim with "c:\temp\foo" it complains
> 
>   E303: Unable to open swap file for "c:\temp\foo", recovery impossible
> 
> However, it then manages to correctly write the file out to the indicated
> path.  Looking at strace shows it trying to open a file named
> /tmp/c:\temp\foo.swp; it thinks the whole path is a relative name in the
> current directory.
> 
> This is a problem if you set $EDITOR to vim and then have non-Cygwin 
> programs invoke vim.

Use the cygpath utility then.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vim doesn't quite get backslash-separated paths right
  2002-04-22  1:08 ` Corinna Vinschen
@ 2002-04-22 11:36   ` Chris Metcalf
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Metcalf @ 2002-04-22 11:36 UTC (permalink / raw)
  To: Corinna Vinschen; +Cc: cygwin

On Mon, 22 Apr 2002, Corinna Vinschen wrote:
> Use the cygpath utility then.

This is awkward in the context of something like $EDITOR, which is spawned 
off by some non-Cygwin program to run vim.  In this case you'd either need 
to do a .bat file, or else a simple executable that ran cygpath and then 
exec'ed vim.  The vim fix turns out to be basically a one-liner anyway.

I've pretty well fixed up everything I need to now, and Cygwin is humming
along very nicely.  Many thanks to the efforts of all those involved.
(BTW, I've got a modified bash.exe that doesn't pass ":" to readlist as a
word-break character if anyone would like a patch or a binary.)

                Chris Metcalf -- InCert Software -- 1 (617) 621 8080
                metcalf@incert.com -- http://www.incert.com/~metcalf


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-22 18:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-19 13:42 vim doesn't quite get backslash-separated paths right Chris Metcalf
2002-04-22  1:08 ` Corinna Vinschen
2002-04-22 11:36   ` Chris Metcalf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).