Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim creates copies of my files after saving?

Tags:

vim

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 hide these files?

I type :wq to save and quit.

enter image description here

like image 470
darren Avatar asked Sep 18 '25 06:09

darren


1 Answers

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.

like image 92
Drasill Avatar answered Sep 21 '25 03:09

Drasill