Saturday, August 3, 2013

Re: now swap file when loading file below a certain directory?

On Friday, September 16, 2011 9:42:51 AM UTC-7, meino....@gmx.de wrote:
> Gary Johnson <gary…@spocom.com> [11-09-16 17:26]:
> > On 2011-09-16, mcc wrote:
> > > can I instruct vim not to create a swap file, when the original
> > > file is below a certain directory???
I wanted the same thing, only in my case it was when using a very slow filesystem and it's very clear that the above autocmd only makes vim destroy the swapfile again after creating it.

I'd be very interested to see a way to prevent the swapfile from being created in the first place for certain paths. It seems like it's almost possible to disable swap by default and selectively enable it with some jiggering of autocmds, 'swapfile', and 'updatecount', but it's complicated by the fact that 'swapfile' is local-only and there doesn't seem to be any autocmd executed _after_ the buffer is initialized but _before_ the swapfile is created.

David

--
--
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@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment