Improve backup system

This commit introduces several improvements to the backup system.

* Backups are made every 8 seconds for buffers that have been modified
  since the last backup.

* The `permbackup` option allows users to specify that backups should
  be kept permanently.

* `The backupdir` option allows users to store backups in a custom
   directory.

Fixes #1641
Fixes #1536
Ref #1539 (removes possibility of race condition for backups)
This commit is contained in:
Zachary Yedidia
2020-06-22 17:54:56 -04:00
parent c5136820c4
commit a8332fd316
5 changed files with 68 additions and 27 deletions

View File

@@ -247,6 +247,7 @@ var defaultCommonSettings = map[string]interface{}{
"autoindent": true,
"autosu": false,
"backup": true,
"backupdir": "",
"basename": false,
"colorcolumn": float64(0),
"cursorline": true,
@@ -261,6 +262,7 @@ var defaultCommonSettings = map[string]interface{}{
"keepautoindent": false,
"matchbrace": true,
"mkparents": false,
"permbackup": false,
"readonly": false,
"rmtrailingws": false,
"ruler": true,