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

139021Re: Disable swap file for large files?

Expand Messages
  • Ben Fritz
    Aug 22, 2013
    • 0 Attachment
      On Thursday, August 22, 2013 1:25:29 AM UTC-5, Christian Brabandt wrote:
      >
      > No. There are only two ways handling this. If you don't really change
      >
      > the buffer, you can disable the undo and later :rundo the
      >
      > existing undofiles.

      Woah, woah, woah!

      Could one theoretically add to the autocmd that detects a large file, to (before setting undolevels) do something like:

      bufdo let names[bufnr('%')] = tempname() | exe 'wundo' names[bufnr('%')]

      And then when closing the file/undoing the largefile settings,

      bufdo exe 'rundo' names[bufnr('%')]

      (with error handling and all that added of course).

      Probably would want to set 'nomodifiable' on all the buffers until the largefile settings were out of effect or something to prevent creating new changes not in the undo file.

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

      ---
      You received this message because you are subscribed to the Google Groups "vim_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 14 messages in this topic