Loading ...
Sorry, an error occurred while loading the content.

56421Re: Swap file cannot be opened

Expand Messages
  • Jean-Sebastien Trottier
    Feb 8, 2005
    • 0 Attachment
      Hi again Karthik,

      On Tue, Feb 08, 2005 at 11:03:15AM -0500, Karthik Krishnan wrote:
      > Thanks a bunch Sebastien. That really helped.
      >
      > Yes that was the windows gVim that I've been using on cygwin.
      > One last question, I've been trying to disable the swap file creation.
      > Often if I try to open a file in a directory as in
      > gVim /somedir/subdir/somefile

      /somdir/subdir/somefile is not a "Windows" path, it is a POSIX path, as
      supported by Cygwin and other UNIX-like environments...

      Since you are using the Windows gVim, you need to pass it "Windows"
      paths, like such:
      gVim `cygpath -w /somedir/subdir/somefile`

      the above path will probably be substituted to something like:
      C:\cygwin\somedir\subdir\somefile

      Of course, this is not always needed... For relative paths (like:
      ../somedir/somefile) the path will be "compatible" with the "Windows"
      format (since gVim treats \ and / the same). However, if any of the
      somponents in that path are Cygwin mount points or soft-links, then it
      is most likely that you will still need to use cygpath to convert it to
      "Windows" format.

      > the file often fails to open cause it throws up an error as in :
      > E303: Unable to opne swap file for "\somedir\subdir\somefile" [New File]
      >
      > I am guessing that's cause of permissions too, but surprisingly all
      > directories in the tree have rwx permissions.
      >
      > Any suggestions.

      Find a precompiled or compile your own gVim as a "real" Cygwin
      application. (google a bit, you'll find one or how, I'm sure)
      >
      > Thanks again for your time.
      > regards
      > karthik

      You're welcome...

      Good luck,
      Sebastien

      >
      > Jean-Sebastien Trottier wrote:
      >
      > >Hi Karthik,
      > >
      > >It seems as though you are talking about the Windows version of gvim,
      > >not gvim compiled for Cygwin, right?
      > >
      > >The Windows version of gvim does not know anything about the special
      > >ACLs (Access Control Lists) that Cygwin uses. Creating a new file on
      > >Windows' Notepad would also create a "executable" file.
      > >
      > >You should be able to work around this issue by changing the
      > >"backupcopy" variable in gvim. See:
      > > :help 'backupcopy'
      > >
      > >You should try ":set backupcopy=yes" (without the quotes), this will
      > >make sure that the original permissions on your files are left
      > >untouched.
      > >
      > >Good luck,
      > >Sebastien
      > >
      > >On Mon, Feb 07, 2005 at 07:15:01PM -0500, Karthik Krishnan wrote:
      > >
      > >
      > >>Dear VIM users and developers,
      > >>
      > >>When I open files and save files using gVim from my cygwin shell, their
      > >>permissions get set to executable. This messes up their colouring and
      > >>cvs writes. Setting umask to 644 did not help. This does not happen when
      > >>I open files with vi or vim. Has anybody had the same problem ?
      > >>
      > >>Thanks
      > >>karthik
      > >>
      > >>
      > >>
      > >>
      >
    • Show all 8 messages in this topic