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

Swap file not deleted after cancelling a vimgrep call

Expand Messages
  • NEANG Vissale
    I have a tag file of 17 Mo, when I run a vimgrep on this file and after a cancel during the search (with CTRL-C), it seems that the swap file created by
    Message 1 of 2 , May 1, 2006
    • 0 Attachment
      I have a tag file of 17 Mo, when I run a vimgrep on this file and after a cancel
      during the search (with CTRL-C), it seems that the swap file created by vimgrep
      is not deleted.
      If I repeat the operation, another swap file is created with the extension .swo
      and if I repeat the operation again a new swap file is created with the
      extension .swm and so on.

      However there is no problem if the tag file is open in vim, new swap files are
      not created.

      Is it a normal behaviour?

      I am on Windows XP with Vim 7.0g

      Thanks
    • Bram Moolenaar
      ... I guess that you press CTRL-C while Vim is still loading the file. The buffer is then marked as modified and will be hidden instead of wiped out. :ls!
      Message 2 of 2 , May 2, 2006
      • 0 Attachment
        Vissale Neang wrote:

        > I have a tag file of 17 Mo, when I run a vimgrep on this file and
        > after a cancel during the search (with CTRL-C), it seems that the swap
        > file created by vimgrep is not deleted.
        > If I repeat the operation, another swap file is created with the
        > extension .swo and if I repeat the operation again a new swap file is
        > created with the extension .swm and so on.
        >
        > However there is no problem if the tag file is open in vim, new swap
        > files are not created.
        >
        > Is it a normal behaviour?
        >
        > I am on Windows XP with Vim 7.0g

        I guess that you press CTRL-C while Vim is still loading the file. The
        buffer is then marked as modified and will be hidden instead of wiped out.
        ":ls!" should show the buffer as hidden.

        When you exit Vim the swap files disappear, right?

        --
        BLACK KNIGHT: I'm invincible!
        ARTHUR: You're a looney.
        "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ download, build and distribute -- http://www.A-A-P.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
      Your message has been successfully submitted and would be delivered to recipients shortly.