On Fr, 25 Okt 2019, Christian Brabandt wrote:
> > On Fr, 25 Okt 2019, Sihera Andre wrote: > > > Hello all, > > > > The "backupcopy" option does not appear to be working as > > documented in the version of VIM I have built locally. As the > > run-time contains online help for the feature I assume that > > my version of VIM supports it, or does it? > > > > Binary: 8.0.1766 > > Runtime: 8.0.1766 > > (full information at bottom) > > > > This is the age-old chestnut about trying to symbolic link > > "~/.viminfo" to another directory. The following URL is what > > appears to be the most recent bug raised on the issue: > > > > https://github.com/vim/vim/issues/2506 > > > > It was marked as resolved but my experiences beg to differ. > > These are the situations I am seeing: > > > > 1) I have no ".vimrc"; I edit shell script "x"; syntax highlighting > > is normal; ":set backupcopy" returns "auto"; I cursor around > > in file; I exit file; ".viminfo" is written as a regular file with > > lastediting position in "x". > > > > 2) I copy "~/.viminfo" to "~/temp/.viminfo" and symbolic link > > "~/.viminfo" to "~/temp/.viminfo"; I have no ".vimrc"; I edit > > script file "x"; syntax highlighting is normal; "set backupcopy" > > returns "auto"; I enter ":set backupcopy=yes"; I cursoraround > > in file; I exit file; ".viminfo" is written as a regular filewith > > last editing position in "x" and the symbolic link vanishes. > > > > 3) I copy "~/.viminfo" to "~/temp/.viminfo" and symbolic link > > "~/.viminfo" to "~/temp/.viminfo"; In the shell I execute > > "echo 'set backupcopy=yes' >~/.vimrc"; I edit file "x"; all > > *syntax highlighting disappears* and all text renders in white; > > ":set backupcopy" returns "yes"; I cursor around in file; I > > exit file; ".viminfo" is written as a regular file with last > > editingposition in "x" and the symbolic link vanishes. > > > > 4) Setting "backupcopy" to "no" when performing (2) or (3) > > above has no effect. In this case it performs as documented. > > The backupcopy option tells vim how to handle backup files. I don't > think it handles how the viminfo file is written. > > It does not tell how the actual file is written. Have a look at `:h > backup-table` for how this interacts. Note for tests, make sure not to > use a temporary directory, as the `backupskip` option might catch this > and you might get different results. BTW: I don't understand what you > mean with > > ,---- > | 3) I copy "~/.viminfo" to "~/temp/.viminfo" and symbolic link > | "~/.viminfo" to "~/temp/.viminfo"; In the shell I execute > `---- > > Are you copying it or symlinking it? > Also can you please provide step by steps of what you did and what you > expect? Thanks. > > > "echo 'set backupcopy=yes' >~/.vimrc"; I edit file "x"; all > > *syntax highlighting disappears* and all text renders in white; > > Check :h defaults.vim BTW: see also here, why symlinking of the viminfo file does not work: https://groups.google.com/forum/#!msg/vim_dev/D-gkgoJh3Z4/WnERHnAKfEQJ Best, Christian -- Kommt ein Zombie nachts vorbei, gibt's im Bett 'ne Keilerei. -- -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20191025065906.GI26491%40256bit.org.
