Changes to /etc/vim/vimrc don't work. If I change the parameter in /usr/share/vim/vim82/defaults.vim then it is removed after vim update. The only solution is to add parameters to ~ /.vimrc for each user. It blows my mind.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
what problem are you trying to solve? And why can't you use ~/.vimrc? Depending on your distribution, it might be possible. Debian e.g. uses /etc/vim/vimrc.local.
Also possible duplicate of #2042 #2841 #1188 and #1326
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Changes to /etc/vim/vimrc don't work. If I change the parameter in /usr/share/vim/vim82/defaults.vim then it is removed after vim update. The only solution is to add parameters to ~ /.vimrc for each user. It blows my mind.
It's not a Vim bug. There is nothing at :help initialization which suggests that /etc/vim/vimrc should be read. Google tells me that this file can be used by package maintainers:
/etc/vim/vimrc is a system-wide default Vim configuration added by the corresponding package maintainers (e.g. the Debian folks for the vim-common APT package). It represents the opinion of the distribution's maintainers about good (and secure) defaults.
The devs have no control over how Vim is packaged on each OS (thank you for providing this information BTW).
The closest file I can think of is the one documented at :help system-vimrc. On your system, it could be /usr/share/vim/vimrc; that's the 1st line in the output of :scriptnames that you posted. Or maybe try /etc/vim/vimrc.local; that's the 7th line.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
On your system, it could be
/usr/share/vim/vimrc;
This is a symlink to /etc/vim/vimrc, since /usr/share files aren't supposed to be edited.
The problem is the unintuitive behavior of defautls.vim, as described in the issues Christian already mentioned.
The system-vimrc is where sysadmins expect to put things that apply to all users. However, defaults.vim is loaded after that (only if the user doesn't have a ~/.vimrc) and overrides their choices.
The solution, @stm32repo, which is suggested in /etc/vim/vimrc if you're on a Debian-based system, is to source defaults.vim in the system vimrc (or vimrc.local) and then override the settings you dislike from defaults.vim.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Alternatively, you can try to set the skip_defaults_vim variable to make Vim bail out early when sourcing the defaults.vim script:
let g:skip_defaults_vim = 1
See :help skip_defaults_vim. Requires the patch 7.4.2319.
Considering that:
I guess the issue can be closed.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Generally, sys admins should not force their own opinion upon their users. Just give them the Vim defaults and don't confuse them with undocumented defaults.
If you are stubborn and want to do it anyway, the solution from James McCoy works. So nothing to change in Vim.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
Closed #9506.
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()