On Tue, Aug 9, 2022 at 7:54 PM Tim Chase <[email protected]> wrote:
>
> I upgraded packages on my FreeBSD box yesterday and noticed that
> vimrc behavior had changed.
>
> Prior to the upgrade, if I had a ~/.vimrc it wouldn't source the
> defaults.vim file.
>
> :help VIMINIT
>
> >  The first that exists is used, the others are ignored.
>
> and it proceeds to list .vimrc (which I have) and, later down,
> defaults.vim (which should be ignored because I have a .vimrc)
>
> However, 'scrolloff' and 'mouse' are now annoyingly getting set
> (along with other defaults.vim tweaks):
>
>   :verbose set scrolloff? mouse?
>     mouse=nvi
>       Last set from /usr/local/share/vim/vim90/defaults.vim line 85
>     scrolloff=5
>       Last set from /usr/local/share/vim/vim90/defaults.vim line 51
>
> According to tracing startup:
>
>   :scriptnames
>   1: /usr/local/etc/vim/vimrc
>   2: /usr/local/share/vim/vim90/defaults.vim
>   3: /usr/local/share/vim/vim90/filetype.vim
>   4: /usr/local/share/vim/vim90/ftplugin.vim
>   5: /usr/local/share/vim/vim90/indent.vim
>   6: /usr/local/share/vim/vim90/syntax/syntax.vim
>   7: /usr/local/share/vim/vim90/syntax/synload.vim
>   8: /usr/local/share/vim/vim90/syntax/syncolor.vim
>   9: /usr/local/share/vim/vim90/colors/lists/default.vim
>  10: /usr/local/share/vim/vim90/syntax/nosyntax.vim
>  11: ~/.vimrc
>  [snip]
>
> it's the /usr/local/etc/vim/vimrc causing the issue.
>
> Is this a FreeBSD package customization problem (and I should go
> grumble to the FreeBSD package maintainer(s)), or did the default
> system vimrc start ignoring the description in `:help VIMINIT`, and
> force defaults.vim on those of us who detest it (in which case,
> please revert this)?
>
> -Tim

Yes, it's your distro admins giving you what they think is good for
you. That's the problem with Vim executables built by distro
maintainers: they often come with a "system vimrc" doing undesired
things. If you compile your own Vim with default directory settings,
it will look for a system vimrc at /usr/local/share/vim/vimrc, find
none, and happily proceed with your ~/.vimrc (which, in my own-built
Vim, comes at the very top of the :scriptnames). What I do near (but
not at) the top of my ~/.vimrc is source the
$VIMRUNTIME/vimrc_example.vim (which, in recent versions of Vim,
sources the defaults.vim) and then undo whatever it sets that I don't
like (e.g. I have a line "filetype indent off" to counteract the
"indent" part of its "filetype plugin indent on").

Best regards,
Tony.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" 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_use/CAJkCKXsbssjSJ%2BbJnZXEx0-hL1VhoadBZV3NgrJg2skzf0yiUg%40mail.gmail.com.

Reply via email to