Why VIM backup filenames are not correct? 'backupdir' option not performing as expected -
Why VIM backup filenames are not correct? 'backupdir' option not performing as expected -
i'm building custom vimrc improve workflow, , liked thought of setting centralized directory maintain backup, swap , undo files together, this:
" === backup settings === " turn backup on set backup set backupdir=~/.vim/backup// " === swap files === " turn swap files on set swapfile set directory=~/.vim/swap// " === undo files === " turn undofiles on set undofile set undodir=~/.vim/undo// the double trailing slash supposed result in filename expansion, resulting backup/swap/undo filename total path, % replacing every /, %home%username%path%to%your%file.ext.
everything works swap , undo files, backups refuses work, generating filenames in format file.ext~ without total path expansion, means when edit 2 files same name, backup of first lost (overwritten second).
does have clue problem?
it seems 'backupdir' alternative doesn't back upwards translation of total absolute path filename (using % path separators) 'directory' , 'undodir' do. @ to the lowest degree nil mentioned under :help 'backupdir'.
since inconsistent, , see utilize case, should submit request @ vim_dev mailing list. actually, there such patch in (veeery long) patch queue (:help todo.txt):
7 'directory' alternative supports changing path separators "%" create file names unique, back upwards 'backupdir'. (mikolaj machowski) patch christian brabandt, 2010 oct 21. please kindly lobby on vim_dev mailing list have priority raised!
vim
Comments
Post a Comment