Wednesday, September 12, 2012

Re: Changing location of swap directory for selected files, how to?

On Wed, Sep 12, 2012 at 06:52:39PM +0530, Karthick Gururaj wrote:
> Hello,

> I would like to modify the value of 'dir' option for a few specific
> files (e.g: all files in directory ~/Foo/). Had 'dir' been a buffer
> local option, it would have been a easy thing,
> au BufEnter ~/Foo/* set dir=newval

> But 'dir' is global across buffers. Can anyone suggest workarounds?

you might consider setting the 'directory' option to a real directory,
then your swapfiles won't pollute the same path of the files you're
editing, and also buys you the advantage of being able to query that
path before a new edit session to see what if anything is already being
edited

you mentioned obtaining default behavior -- the default for 'directory'
is to have real paths and all swapfiles in one place

sc

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

No comments: