patch 9.1.1359: filetype: GNU Radio config files are not recognized Commit: https://github.com/vim/vim/commit/9c9200d1eafe50077222a38bfad6cba7156a6487 Author: zeertzjq <zeert...@outlook.com> Date: Fri May 2 15:32:23 2025 +0200
patch 9.1.1359: filetype: GNU Radio config files are not recognized Problem: filetype: GNU Radio config files are not recognized. Solution: detect GNU Radio config files as confini filetype. Only allow '#' as start of comment in confini syntax (zeertzjq). Ref: - https://wiki.gnuradio.org/index.php/Configuration_Files closes: #17242 Signed-off-by: zeertzjq <zeert...@outlook.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 87eac418f..209f0dc2e 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: 2025 Apr 24 +" Last Change: 2025 May 02 " Former Maintainer: Bram Moolenaar <b...@vim.org> " Listen very carefully, I will say this only once @@ -1811,6 +1811,8 @@ au BufNewFile,BufRead pacman.conf,mpv.conf setf confini au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini au BufNewFile,BufRead *.nmconnection setf confini au BufNewFile,BufRead paru.conf setf confini +au BufNewFile,BufRead */{,.}gnuradio/*.conf setf confini +au BufNewFile,BufRead */gnuradio/conf.d/*.conf setf confini " Pacman hooks au BufNewFile,BufRead *.hook diff --git a/runtime/syntax/cfg.vim b/runtime/syntax/cfg.vim index 4b5ebf5c2..69788760c 100644 --- a/runtime/syntax/cfg.vim +++ b/runtime/syntax/cfg.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Good old CFG files " Maintainer: Igor N. Prischepoff (i...@tyumbit.ru, pri_i...@mail.ru) -" Last change: 2012 Aug 11 +" Last Change: 2012 Aug 11 " 2024 Nov 14 by Vim project: // only denotes a comment when starting a line (#16051) " quit when a syntax file was already loaded diff --git a/runtime/syntax/confini.vim b/runtime/syntax/confini.vim index 823d417a8..009a60c60 100644 --- a/runtime/syntax/confini.vim +++ b/runtime/syntax/confini.vim @@ -1,5 +1,7 @@ " Vim syntax file " Language: confini +" Last Change: +" 2025 May 02 by Vim project commented line starts with # only " Quit if a syntax file was already loaded if exists("b:current_syntax") @@ -9,4 +11,8 @@ endif " Use the cfg syntax for now, it's similar. runtime! syntax/cfg.vim +" Only accept '#' as the start of a comment. +syn clear CfgComment +syn match CfgComment "#.*" contains=@Spell + let b:current_syntax = 'confini' diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 260c3ee72..bfafdbb36 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -183,7 +183,8 @@ def s:GetFilenameChecks(): dict<list<string>> conaryrecipe: ['file.recipe'], conf: ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc', '.chktexrc', '.ripgreprc', 'ripgreprc', 'file.ctags'], config: ['configure.in', 'configure.ac', '/etc/hostname.file', 'any/etc/hostname.file'], - confini: ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'], + confini: ['pacman.conf', 'paru.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection', + 'any/.gnuradio/grc.conf', 'any/gnuradio/config.conf', 'any/gnuradio/conf.d/modtool.conf'], context: ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'], cook: ['file.cook'], corn: ['file.corn'], diff --git a/src/version.c b/src/version.c index 817398858..d64a1e6c5 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1359, /**/ 1358, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1uAqhL-003X9C-QH%40256bit.org.