[vim/vim] Not work parameter mouse="" in /etc/vim/vimrc (Issue #9506)

24 views
Skip to first unread message

stm32repo

unread,
Jan 11, 2022, 3:59:55 AM1/11/22
to vim/vim, Subscribed

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.Message ID: <vim/vim/issues/9506@github.com>

Christian Brabandt

unread,
Jan 11, 2022, 4:23:59 AM1/11/22
to vim/vim, Subscribed

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.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/9506/1009752075@github.com>

lacygoill

unread,
Jan 11, 2022, 4:33:23 AM1/11/22
to vim/vim, Subscribed

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.Message ID: <vim/vim/issues/9506/1009760213@github.com>

James McCoy

unread,
Jan 11, 2022, 10:19:01 AM1/11/22
to vim/vim, Subscribed

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.Message ID: <vim/vim/issues/9506/1010065820@github.com>

lacygoill

unread,
Jan 11, 2022, 12:19:33 PM1/11/22
to vim/vim, Subscribed

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:

  • there exist duplicate issues which have been closed
  • a workaround was given
  • the OP did not bother to fill the template

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.Message ID: <vim/vim/issues/9506/1010186142@github.com>

Bram Moolenaar

unread,
Jan 11, 2022, 12:55:52 PM1/11/22
to vim/vim, Subscribed

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.Message ID: <vim/vim/issues/9506/1010216856@github.com>

Bram Moolenaar

unread,
Jan 11, 2022, 12:55:56 PM1/11/22
to vim/vim, Subscribed

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.Message ID: <vim/vim/issue/9506/issue_event/5875315844@github.com>

Reply all
Reply to author
Forward
0 new messages