139029Re: Disable swap file for large files?
- Aug 22, 2013Christian Brabandt wrote:
> On Thu, August 22, 2013 16:37, Ben Fritz wrote:I've been trying it out, but I'm going to have to put this mod down for
>> 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.
> Might work. Not sure, one wants to use several tempname() calls at all,
> since tempname() is only guaranteed to give distinct names for 26 calls
> and some plugins make use of tempname() themselves (so it could happen,
> that plugins overwrite the undofile).
now. I've got BufLeave events firing when they shouldn't.
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 >>