diff options
author | Gregory Anders <greg@gpanders.com> | 2021-08-19 20:34:43 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2021-08-27 10:34:44 -0600 |
commit | 460019366e58e1bcd42959f76494e38bd895e762 (patch) | |
tree | f172338dbb176d3ff4bec6e8af639a4b6221a117 /runtime | |
parent | 32024787b6b1ef39c23bda1653c23b5dfbde9e81 (diff) | |
download | rneovim-460019366e58e1bcd42959f76494e38bd895e762.tar.gz rneovim-460019366e58e1bcd42959f76494e38bd895e762.tar.bz2 rneovim-460019366e58e1bcd42959f76494e38bd895e762.zip |
feat: defaults: auto-create backup dir
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.
Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.
The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.
Co-authored by: murphy66 <murphy66@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/options.txt | 6 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 364d4c5167..48fdf66d7b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -824,7 +824,7 @@ A jump table for the options with a short description can be found at |Q_op|. again not rename the file. *'backupdir'* *'bdir'* -'backupdir' 'bdir' string (default ".,$XDG_DATA_HOME/nvim/backup") +'backupdir' 'bdir' string (default ".,$XDG_DATA_HOME/nvim/backup//") global List of directories for the backup file, separated with commas. - The backup file will be created in the first directory in the list @@ -6533,7 +6533,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'ttyfast' 'tf' Removed. |vim-differences| *'undodir'* *'udir'* *E5003* -'undodir' 'udir' string (default "$XDG_DATA_HOME/nvim/undo") +'undodir' 'udir' string (default "$XDG_DATA_HOME/nvim/undo//") global List of directory names for undo files, separated with commas. See |'backupdir'| for details of the format. @@ -6692,7 +6692,7 @@ A jump table for the options with a short description can be found at |Q_op|. displayed when 'verbosefile' is set. *'viewdir'* *'vdir'* -'viewdir' 'vdir' string (default: "$XDG_DATA_HOME/nvim/view") +'viewdir' 'vdir' string (default: "$XDG_DATA_HOME/nvim/view//") global Name of the directory where to store files for |:mkview|. This option cannot be set from a |modeline| or in the |sandbox|, for diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index 166c0c17aa..918b35439d 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -30,7 +30,7 @@ the differences. - 'autoread' is enabled - 'background' defaults to "dark" (unless set automatically by the terminal/UI) - 'backspace' defaults to "indent,eol,start" -- 'backupdir' defaults to .,~/.local/share/nvim/backup (|xdg|) +- 'backupdir' defaults to .,~/.local/share/nvim/backup// (|xdg|), auto-created - 'belloff' defaults to "all" - 'compatible' is always disabled - 'complete' excludes "i" @@ -63,7 +63,7 @@ the differences. - 'tags' defaults to "./tags;,tags" - 'ttimeoutlen' defaults to 50 - 'ttyfast' is always set -- 'undodir' defaults to ~/.local/share/nvim/undo (|xdg|), auto-created +- 'undodir' defaults to ~/.local/share/nvim/undo// (|xdg|), auto-created - 'viewoptions' includes "unix,slash", excludes "options" - 'viminfo' includes "!" - 'wildmenu' is enabled |