2017-02-12 7:17 GMT+03:00 thecliguy <[email protected]>: > I am running the following version of Vim on Windows 10: > > VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 6 2016 17:05:36) > MS-Windows 32-bit console version > Included patches: 1-69 > > I have observed that upon editing a file and writing the changes, an > additional file is created, the name of which is the same as the original > but with ~ appended to it. This additional file contains the content prior > to the write and remains even after having closed Vim. > > I wanted to know whether it is the expected behaviour that the backup file > remains even once Vim has been closed, I therefore consulted the help... > > The help topic backup-table refers to two settings (backup and writebackup) > which are responsible for the circumstances under which a backup file is > created. > > Although my user vimrc file ($HOME\_vimrc) doesn't directly contain a > reference to either backup and/or writebackup, the first line in the file is > source $VIMRUNTIME/vimrc_example.vim, which does contain such a reference. > According to the logic within $VIMRUNTIME/vimrc_example.vim, backup is > enabled for any operating system other than 'VMS': > > if has("vms") > set nobackup " do not keep a backup file, use versions instead > else > set backup " keep a backup file (restore to previous version) > if has('persistent_undo') > set undofile " keep an undo file (undo changes after closing) > endif > endif > > Whilst consulting the help, I discovered another topic backup-changed, which > suggests that the backup option used to be on by default (in previous > versions of Vim) but is now off by default: > > The default value for 'backup' used to be on. This resulted in a backup > file > being made when the original file was overwritten. > > Now the default for 'backup' is off. As soon as the writing of the file has > successfully finished, the backup file is deleted. If you want to keep the > backup file, set 'backup' on in your vimrc. The reason for this change is > that many people complained that leaving a backup file behind is not > Vi-compatible. > > So my question is, why does $VIMRUNTIME/vimrc_example.vim enable backup in > contradiction to the backup-changed help topic which states that it is > supposed to be off by default?
Why it should not? vimrc_example.vim is an example of vimrc file, it is *not* a collection of default values and neither it is in any way required to be used by the user. > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > > -- > -- > You received this message from the "vim_dev" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
