'set nobackup' in the .vimrc file worked. I don't like to have my
directories littered with filename~
Thanks!
Peter
On Jan 20, 11:26 pm, Gary Johnson <garyj...@spocom.com> wrote:
> On 2010-01-20, Peter Berntsen wrote:
>
>
>
> > On 20 Jan, 06:27, Gary Johnson <garyj...@spocom.com> wrote:
> > > On 2010-01-19, Peter Berntsen wrote:
>
> > > > Running 7.2.245 under Slackware Linux 13.0 and I have noticed that
> > > > my .vimrc file doesn't seem to be read. For example to not keep a
> > > > backup file I comment out the code for that in the vimrc file like
> > > > this.
> > > > "if has("vms")
> > > > " set nobackup " do not keep a backup file, use versions
> > > > instead
> > > > "else
> > > > " set backup " keep a backup file
> > > > "endif
>
> > > > this only works when it is done in the /usr/share/vimrc file and not
> > > > if it is done in the ~/.vimrc file.
> > > > Is there something I have overlooked or is this a bug in version
> > > > 7.2.245?
>
> > > I'm not aware of any such bug in any version of vim 7.2. One thing
> > > you might try to find the source of the problem is to execute
>
> > > :verbose set backup?
>
> > > to see where 'backup' was last set. Another is to execute
>
> > > :scriptnames
>
> > > which will show you all the files that have been sourced.
> > OK Gary,
>
> > :verbose set backup?
> > backup
>
> > :h verbose set backup
> > E149 Sorry, no help for verbose set backup
>
> > What does verbose set backup do?
>
> It will show you where 'backup' was last set. See
>
> :help :set-verbose
>
> For you it just printed "backup". That indicates that either it has
> not been set since vim was started or that it was last set from the
> command line. It was not set in any of your configuration files.
>
>
>
> > :scriptnames
>
> > 1: /usr/share/vim/vimrc
> > 2: /usr/share/vim/vim72/syntax/syntax.vim
> > 3: /usr/share/vim/vim72/syntax/synload.vim
> > 4: /usr/share/vim/vim72/syntax/syncolor.vim
> > 5: /usr/share/vim/vim72/filetype.vim
> > 6: /usr/share/vim/vim72/ftplugin.vim
> > 7: /usr/share/vim/vim72/indent.vim
> > 8: /home/peter/.vimrc
> > 9: /usr/share/vim/vim72/syntax/nosyntax.vim
> > 10: /usr/share/vim/vim72/plugin/getscriptPlugin.vim
> > 11: /usr/share/vim/vim72/plugin/gzip.vim
> > 12: /usr/share/vim/vim72/plugin/matchparen.vim
> > 13: /usr/share/vim/vim72/plugin/netrwPlugin.vim
> > 14: /usr/share/vim/vim72/plugin/rrhelper.vim
> > 15: /usr/share/vim/vim72/plugin/spellfile.vim
> > 16: /usr/share/vim/vim72/plugin/tarPlugin.vim
> > 17: /usr/share/vim/vim72/plugin/tohtml.vim
> > 18: /usr/share/vim/vim72/plugin/vimballPlugin.vim
> > 19: /usr/share/vim/vim72/plugin/zipPlugin.vim
> > 20: /usr/share/vim/vim72/scripts.vim
> > 21: /usr/share/vim/vim72/ftplugin/help.vim
> > 22: /usr/share/vim/vim72/syntax/help.vim
>
> > as #8 we see that .vimrc file is sourced.
>
> That verifies that both /usr/share/vim/vimrc and /home/peter/.vimrc
> were sourced, so setting 'backup' in either place should work.
>
> The example you gave showed the commands preceded by comment
> characters ("). If they are actually commented-out in your
> ~/.vimrc, that would explain why they aren't being executed.
>
> > If this makes any difference. I have aliased vim = gvim -v in
> > my .bashrc file.
>
> It shouldn't make any difference.
>
> Regards,
> Gary
No comments:
Post a Comment