There are various modes that Vim uses for backups.  By default ("set
nobackup", "set writebackup"), a backup file is created just before
saving and if the save is successful it is deleted.  You can see a full
explanation of the different backup behavior at ":help backup-table".
You may also be interested in the 'backupdir' option in order to
configure where Vim stores the backup files.

Backups are completely independent of the :recover command, though.
That command is used to restore from a swap file, which would exist if
Vim crashed while you were in the middle of editing or you lost power or
something drastic along those lines.

So, in Vim's default configuration it does create both backup and swap
files, but only temporally -- they're deleted as soon as they're not
needed.  This prevents littering the system with many extraneous files
while still providing safeguards.  That is the proper default behavior
IMO and if you want different behavior, then you can configure Vim to
behave differently.

-- 
Backups (recover) disabled by default: no backups
https://bugs.launchpad.net/bugs/151791
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to