Does Vim make copies of my files after saving?

Hi

Using vim and whenever I make changes and save the file, vim seems to create a backup file. I see that this is a file before I made changes and saved. How can I prevent this or hide these files?

I type : wq to save and exit.

enter image description here

+3
source share
2 answers

Add set nobackupto your ~/.vimrcfile.

+4
source

Yeak, preferably you should set sth as:

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

Pay attention also to the savevers plugin.

This way, you will never have files in places you don’t need, but keep the backup function.

+8
source

Source: https://habr.com/ru/post/1793570/


All Articles