Summary: | >=app-editors/vim-8: mouse always enabled | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jason A. Donenfeld <zx2c4> |
Component: | Current packages | Assignee: | Vim Maintainers <vim> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Jason A. Donenfeld
2016-09-18 22:31:43 UTC
Okay, trudging through the VIM source code, apparently if there's no ~/.vimrc, then it sources /usr/share/vim/vim80/defaults.vim. It's either/or. That's weird behavior! That file has this in it: " Bail out if something that ran earlier, e.g. a system wide vimrc, does not " want Vim to use these default values. if exists('skip_defaults_vim') finish endif Perhaps this belongs in /etc/vim/vimrc? > I don't even have a ~/.vimrc...
:help defaults.vim
If Vim is started normally and no user vimrc file is found, the
$VIMRUTIME/defaults.vim script is loaded. This will set 'compatible' off,
switch on syntax highlighting and a few more things. See the script for
details. NOTE: this is done since Vim 8.0, not in Vim 7.4. (it was added in
patch 7.4.2111 to be exact).
and 'set mouse=a' is in defaults.vim, see ':help mouse'.
Yes, okay, so this is new in VIM 8. Apparently we should be putting 'let g:skip_defaults_vim = 1' in /etc/vim/vimrc. I can confirm this fixes the problem. Mind if I merge this and revbump the build? diff --git a/app-editors/vim-core/files/vimrc-r4 b/app-editors/vim-core/files/vimrc-r4 index 07fffcc..fdc316b 100644 --- a/app-editors/vim-core/files/vimrc-r4 +++ b/app-editors/vim-core/files/vimrc-r4 @@ -190,6 +190,10 @@ augroup END endif " has("autocmd") " }}} +" We don't want VIM to load their own built-in defaults, preferring ours here +" instead: +let g:skip_defaults_vim = 1 + " {{{ vimrc.local if filereadable("@GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local") source @GENTOO_PORTAGE_EPREFIX@/etc/vim/vimrc.local 10:44:12 @monsieurp | zx2c4: hi! wrt your vim patch it LGTM commit c7caaf374650078707df8ce9b313e967ceff56f6 Author: Jason A. Donenfeld <zx2c4@gentoo.org> Date: Tue Sep 20 20:02:44 2016 +0200 app-editors/vim-core: don't use vim's defaults (bug #594292) |