On Wed, 2 Mar 2011, Matt Martini wrote:

Hi,

Is it possible to change the name of the swap file that Vim uses?

I have just started using a centralized location for swapfiles with the 'directory' option.  However, I am running into a problem of name space collision, or lack of same.

Append two slashes to the end of your setting.

From :help 'directory':

- For Unix and Win32, if a directory ends in two path separators "//" or
  "\\", the swap file name will be built from the complete path to the
  file with all path separators substituted to percent '%' signs.  This
  will ensure file name uniqueness in the preserve directory.

E.g. I use:

" (some stuff to create ~/.vim-tmp if it doesn't exist)
" then:
set directory=~/.vim-tmp//,~/.tmp//,~/tmp//,/tmp//

--
Best,
Ben

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

Reply via email to