139021Re: Disable swap file for large files?
- Aug 22, 2013On Thursday, August 22, 2013 1:25:29 AM UTC-5, Christian Brabandt wrote:
>Woah, woah, woah!
> 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.
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.
- << Previous post in topic Next post in topic >>