Why VIM backup filenames are not correct? 'backupdir' option not performing as expected

前端 未结 5 360
刺人心
刺人心 2021-01-04 04:15

I\'m building a custom vimrc to improve my workflow, and I really liked the idea of setting a centralized directory to keep all backup, swap and undo files together, like th

5条回答
  •  旧时难觅i
    2021-01-04 05:07

    It seems like the 'backupdir' option doesn't support the translation of the full absolute path into a filename (using % for path separators) like 'directory' and 'undodir' do. At least nothing is mentioned under :help 'backupdir'.

    Since this is inconsistent, and I see your use case, you should submit a request at the vim_dev mailing list. Actually, there is already such a patch in the (veeery long) patch queue (:help todo.txt):

    7   The 'directory' option supports changing path separators to "%" to make
        file names unique, also support this for 'backupdir'. (Mikolaj Machowski)
        Patch by Christian Brabandt, 2010 Oct 21.
    

    Please kindly lobby on the vim_dev mailing list to have its priority raised!

提交回复
热议问题