开发者

vim creates copies of my files after saving?

开发者 https://www.devze.com 2023-02-12 22:29 出处:网络
HI there, Using vim and whenever I make a change and save a file vim seems to create a backup file. I can see that it\'s the file before I made my change and saved.

HI there,

Using vim and whenever I make a change and save a file vim seems to create a backup file. I can see that it's the file before I made my change and saved. How can I prevent this or hid开发者_运维知识库e these files?

I type :wq to save and quit.

vim creates copies of my files after saving?


Yeak, preferably you should set sth like :

set backupdir=~/backup/vim
set dir=~/backup/vim/swap
set undodir=~/backup/vim/undos
set undofile
set bk

Note also the savevers plugin.

So you'll never have files in places you don't want, but keep the backup functionnality.


Add set nobackup to your ~/.vimrc file.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号