How to prevent vim from creating (and leaving) temporary files?

前端 未结 7 2012
时光取名叫无心
时光取名叫无心 2020-11-28 01:09

Why does vim create ~ files? Is there a way to disable that?

If it\'s for backup (or something), I use git for that.

Also, thes

7条回答
  •  情话喂你
    2020-11-28 01:55

    This answer applies to using gVim on Windows 10. I cannot guarantee the same results for other operating systems.

    Add:

    set nobackup
    set noswapfile
    set noundofile
    

    To your _vimrc file.

    Note: This is the direct answer to the question (for Windows 10) and probably not the safest thing to do (read the other answers), but this is the fastest solution in my case.

提交回复
热议问题