Commit: patch 9.2.1127: filetype: Gentoo portage config files are not recognized

1 view
Skip to first unread message

Christian Brabandt

unread,
Sep 24, 2026, 3:00:22 PM (2 days ago) Sep 24
to vim...@googlegroups.com
patch 9.2.1127: filetype: Gentoo portage config files are not recognized

Commit: https://github.com/vim/vim/commit/2c2bae52ac66dbb8ff13c3842aba64c1b64aa0e5
Author: Wu, Zhenyu <wuzh...@ustc.edu>
Date: Thu Sep 24 18:49:12 2026 +0000

patch 9.2.1127: filetype: Gentoo portage config files are not recognized

Problem: filetype: Gentoo portage config files are not recognized
Solution: Detect portage files as sh or confini filetype
(Wu, Zhenyu)

Reference:
https://wiki.gentoo.org/wiki//etc/portage/make.conf
https://wiki.gentoo.org/wiki//etc/portage/repos.conf
https://wiki.gentoo.org/wiki//etc/portage/binrepos.conf

closes: #21343

Signed-off-by: Wu, Zhenyu <wuzh...@ustc.edu>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 6ced3c0a4..957ff0a88 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2026 Sep 11
+" Last Change: 2026 Sep 24
" Former Maintainer: Bram Moolenaar <Br...@vim.org>

" If the filetype can be detected from extension or file name(the final path component),
@@ -910,6 +910,10 @@ au BufNewFile,BufRead PklProject,*.pkl,*.pcf,pkl-lsp://* setf pkl
" WIC kickstarter files
au BufNewFile,BufRead *.wks,*.wks.in,*.wks.inc setf wks

+" Portage
+au BufNewFile,BufRead */portage/make.conf/*.conf,*/portage/make.conf setf sh
+au BufNewFile,BufRead */portage/{bin,}repos.conf/*.conf setf confini
+
" Povray, Pascal, PHP or assembly
au BufNewFile,BufRead *.inc call dist#ft#FTinc()

diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 93fee65bf..1a7d8de78 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -199,7 +199,7 @@ def s:GetFilenameChecks(): dict<list<string>>
conf: ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags'],
config: ['/etc/hostname.file', 'any/etc/hostname.file', 'configure.in', 'configure.ac', 'file.at', 'aclocal.m4'],
confini: ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'any/.aws/cli/alias', 'file.nmconnection',
- 'any/.gnuradio/grc.conf', 'any/gnuradio/config.conf', 'any/gnuradio/conf.d/modtool.conf'],
+ 'any/.gnuradio/grc.conf', 'any/gnuradio/config.conf', 'any/gnuradio/conf.d/modtool.conf', 'any/portage/binrepos.conf/gentoo.conf', 'any/portage/repos.conf/gentoo.conf'],
context: ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
cook: ['file.cook'],
corn: ['file.corn'],
@@ -754,7 +754,8 @@ def s:GetFilenameChecks(): dict<list<string>>
'/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh',
'/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats', '.ash_history', 'any/etc/neofetch/config.conf', '.xprofile',
'user-dirs.defaults', 'user-dirs.dirs', 'makepkg.conf', '.makepkg.conf', 'file.mdd', 'file.cygport', '.envrc', '.envrc.file', 'file.envrc', 'devscripts.conf',
- '.devscripts', 'file.lo', 'file.la', 'file.lai', '/etc/X11/xinit/xinitrc', '/etc/X11/xinit/xserverrc', '~/.xinitrc', '/etc/X11/xinit/xinitrc.d/foobar'],
+ '.devscripts', 'file.lo', 'file.la', 'file.lai', '/etc/X11/xinit/xinitrc', '/etc/X11/xinit/xserverrc', '~/.xinitrc', '/etc/X11/xinit/xinitrc.d/foobar',
+ 'any/portage/make.conf', 'any/portage/make.conf/0100_bootstrap_prefix_make.conf'],
shaderslang: ['file.slang'],
sieve: ['file.siv', 'file.sieve'],
sil: ['file.sil'],
diff --git a/src/version.c b/src/version.c
index 0e3632046..28f1ad520 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1127,
/**/
1126,
/**/
Reply all
Reply to author
Forward
0 new messages