Friday, April 30, 2010

Re: Backups not created

On 2010-04-30, Ritmo2k wrote:
> With an empty .vimrc or one with just "set backup" in it, or
> typing :set backup, I can't get a backup file created on any
> of my CentOS 5 servers. It used to work and has recently stopped
> on all of them?
>
> A strace on a remote hosting chroot running an older version of Centos
> shows it working as expected but on any of my servers it never
> attempts a write of the file anywhere?

My guess is that your newer Centos comes with a system vimrc that
contains some setting that's interfering with your backups.

One way to check this is to execute

:scriptnames

and look for a system vimrc being sourced. It might be
/etc/vimrc or /usr/share/vim/vimrc. See

:help system-vimrc

for more on this file and

:help startup

for the details of what Vim does at startup. If you see such a
file, you can open it and see if it contains anything suspicious.
You can also see the current values of options whose setting differ
from the default by executing

:set

Unfortunately, I'm not familiar with all the options that can affect
backups, but

:help 07.4

seems to explain them pretty well. You can also execute

:options

and search for "backup" (no quotes) to see the backup-related option
settings.

Also, if you see an option value that isn't what you expect it to be
and want to see where it was last set, execute

:verbose set backup?

where I just used the 'backup' option as an example.

You might take a look at

:help --noplugin
:help -u
:help --cmd

to help you start your Vim with complete control over what files are
sourced and what initial settings are made. For example,

$ vim -N -u NONE --cmd 'set backup' foo

should start Vim with default settings for everything but 'backup'
and should save a backup copy of foo if you change foo. You can use
that to verify that your Vim basically works and that the problem
lies in one of your configuration files.

HTH,
Gary

--
You received this message from the "vim_use" 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

No comments:

Post a Comment