Bug 251420 - editors/vim /usr/local/share/vim/vim82/defaults.vim overrides /usr/local/etc/vim/vimrc
Summary: editors/vim /usr/local/share/vim/vim82/defaults.vim overrides /usr/local/etc/...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Adam Weinberger
Depends on:
Reported: 2020-11-27 08:01 UTC by mack
Modified: 2021-07-24 19:27 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (adamw)

vim version info and order of processed config files (6.05 KB, text/plain)
2020-11-27 08:01 UTC, mack
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description mack 2020-11-27 08:01:28 UTC
Created attachment 220026 [details]
vim version info and order of processed config files

The order of processing the config files seems to be odd, as /usr/local/share/vim/vim82/defaults.vim overrides /usr/local/etc/vim/vimrc .

In practice, setting "mouse=r" in /usr/local/etc/vimrc doesn't have any effect, as the mouse option gets overriden in the defaults file.
Comment 1 mack 2020-11-27 08:12:37 UTC
This problem probably lead to the unanswered question at https://forums.freebsd.org/threads/global-configuration-for-vim.60321/

So either the documentation is incorrect or incomplete:

                      System wide Vim initializations.
"... which is overriden by settings in ..."

or the order should be different.
Comment 2 Adam Weinberger freebsd_committer 2021-07-24 19:27:42 UTC
I think this is more of an upstream problem than a FreeBSD problem. We don't alter the load order in any way, so (as you mentioned) either the load order or the documentation about it is wrong. Either way, this seems like a problem that needs to get fixed upstream.

Vim bugs are filed at https://github.com/vim/vim/issues
Can you report there?