swapfile - Change Vim swap/backup/undo file name -


is possible change way vim names swap/backup/undo files?

to avoid clutter, i've set options in ~/.vimrc dump these files in ~/.vim/tmp/{swap,backup,undo}; however, routinely edit files in different directories same name, end lots of otherwise indistinguishable files , vim has trouble recovering.

ideally, i'd use naming scheme persistent undo has (%path%to%file.undo) these auxiliary files; there's no obvious way set it, can done buf{read,write} macros?

i have in .vimrc , names swap files full path names , percent signs describe:

" store swap files in fixed location, not current directory. set dir=~/.vimswap//,/var/tmp//,/tmp//,. 

the key // @ end of directories. see note :help dir:

  • for unix , win32, if directory ends in 2 path separators "//" or "\\", swap file name built complete path file path separators substituted percent '%' signs. ensure file name uniqueness in preserve directory.

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -