From c78e276881eb94aae749a6832c39bbc3622e4440 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 20 Feb 2026 09:16:41 +0800 Subject: [PATCH 1/4] vim-patch:9.2.0027: filetype: yara files are not recognized Problem: filetype: yara files are not recognized Solution: Detect *.yara and *.yar files as yara filetype (Thomas Dupuy). Reference: - https://github.com/VirusTotal/yara - https://github.com/VirusTotal/yara-x closes: vim/vim#19460 https://github.com/vim/vim/commit/7d93ae57f0dc9da7eee8d582dd0d5a22922ffed8 Co-authored-by: Thomas Dupuy --- runtime/lua/vim/filetype.lua | 2 ++ test/old/testdir/test_filetype.vim | 1 + 2 files changed, 3 insertions(+) diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 8beafe608b..42b0a109f8 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1433,6 +1433,8 @@ local extension = { kyml = 'yaml', grc = detect_line1('<%?xml', 'xml', 'yaml'), yang = 'yang', + yara = 'yara', + yar = 'yara', yuck = 'yuck', z8a = 'z8a', zig = 'zig', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 08159bef50..7beb3d3734 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -984,6 +984,7 @@ func s:GetFilenameChecks() abort \ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'file.kyaml', 'file.kyml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock', \ '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', '.mambarc', 'mambarc', 'pixi.lock'], \ 'yang': ['file.yang'], + \ 'yara': ['file.yara', 'file.yar'], \ 'yuck': ['file.yuck'], \ 'z8a': ['file.z8a'], \ 'zathurarc': ['zathurarc'], From c67248988b8685a894128cfcd8c3629cc7ff1886 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 20 Feb 2026 09:17:54 +0800 Subject: [PATCH 2/4] vim-patch:342ae5f: runtime(progress): Use setlocal for expandtab The Progress syntax file gained `set expandtab` in 4c3f536f4 (updated for version 7.0d01, 2006-04-11). The Progress language itself doesn't distinguish between tabs and spaces for indentation, so this seems like something that should be left to user preference; but the setting is accompanied by the comment "The Progress editor doesn't cope with tabs very well", so there may be reason to keep it. However, using `set` means that any new buffers created after editing a Progress file will also have `expandtab` turned on, which is likely contrary to a user's expectations. We should use `setlocal` instead to avoid this. closes: vim/vim#19458 https://github.com/vim/vim/commit/342ae5f8aa612179f9390c21a8129a393a995b1a Co-authored-by: Daniel Smith --- runtime/syntax/progress.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim index 4b8f61287c..deb8199b32 100644 --- a/runtime/syntax/progress.vim +++ b/runtime/syntax/progress.vim @@ -9,7 +9,7 @@ " Chris Ruprecht " Mikhail Kuperblum " John Florian -" Last Change: Jul 23 2024 +" Last Change: Feb 18 2026 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -22,7 +22,7 @@ set cpo&vim setlocal iskeyword=@,48-57,_,-,!,#,$,% " The Progress editor doesn't cope with tabs very well. -set expandtab +setlocal expandtab syn case ignore From 595b4cc48eaad3cd5b6bb018382807bdecf0cf45 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 20 Feb 2026 09:18:11 +0800 Subject: [PATCH 3/4] vim-patch:4611f7b: runtime(apache): Add 'SSLVHostSNIPolicy' declaration to syntax script The declaration 'SSLVHostSNIPolicy' has bee introduced in version 2.4.66. closes: vim/vim#19452 https://github.com/vim/vim/commit/4611f7b65693d6c2e89f1fa02057be718cef6e78 Co-authored-by: Michael Osipov --- runtime/syntax/apache.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runtime/syntax/apache.vim b/runtime/syntax/apache.vim index 65317fd36a..edc650e9df 100644 --- a/runtime/syntax/apache.vim +++ b/runtime/syntax/apache.vim @@ -4,6 +4,7 @@ " License: This file can be redistribued and/or modified under the same terms " as Vim itself. " Last Change: 2024 Nov 24 +" 2026 Feb 19 by Vim project: Add SSLVHostSNIPolicy " Notes: Last synced with apache-2.4.62, version 1.x is no longer supported " TODO: see particular FIXME's scattered through the file " make it really linewise? @@ -163,7 +164,7 @@ syn keyword apacheOption inherit syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase syn keyword apacheDeclaration LoadFile LoadModule syn keyword apacheDeclaration CheckSpelling CheckCaseOnly -syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCompression SSLCryptoDevice SSLEngine SSLFIPS SSLHonorCipherOrder SSLInsecureRenegotiation SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCheckPeerCN SSLProxyCheckPeerExpire SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateChainFile SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRenegBufferSize SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLSessionTicketKeyFile SSLSessionTickets SSLStrictSNIVHostCheck SSLUserName SSLVerifyClient SSLVerifyDepth +syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCompression SSLCryptoDevice SSLEngine SSLFIPS SSLHonorCipherOrder SSLInsecureRenegotiation SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCheckPeerCN SSLProxyCheckPeerExpire SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateChainFile SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRenegBufferSize SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLSessionTicketKeyFile SSLSessionTickets SSLStrictSNIVHostCheck SSLUserName SSLVerifyClient SSLVerifyDepth SSLVHostSNIPolicy syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>" syn keyword apacheOption builtin sem syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):" From 93a8acb1b8049867d9ab459de3e9f8feadc42c1c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 20 Feb 2026 09:18:23 +0800 Subject: [PATCH 4/4] vim-patch:9.2.0033: filetype: sh filetype used for env files Problem: filetype: sh filetype used for env files Solution: Detect *.env and .env.* files as env filetype, detect .envrc and .envrc.* as sh filetype, include a simple env syntax script (DuckAfire) Previously, .env files were handled by the shell syntax. While functional, this limited the ability to support specific .env implementations, such as CodeIgniter4 which allows dots in keys (e.g., "foo.bar=0"). The new dedicated 'env' filetype and syntax script improves legibility and prevents highlighting from breaking when encountering spaces. Currently, the syntax does not support indentation; fields, variables, and comments must start at the beginning of the line. closes: vim/vim#19260 https://github.com/vim/vim/commit/d0fa375629b1bfdb8dc054894ca81d7473268455 Co-authored-by: DuckAfire <155199080+duckafire@users.noreply.github.com> --- runtime/lua/vim/filetype.lua | 5 ++++- runtime/syntax/env.vim | 28 ++++++++++++++++++++++++++++ test/old/testdir/test_filetype.vim | 3 ++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 runtime/syntax/env.vim diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 42b0a109f8..631ca77258 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -446,6 +446,7 @@ local extension = { lc = 'elsa', elv = 'elvish', ent = detect.ent, + env = 'env', epp = 'epuppet', erl = 'erlang', hrl = 'erlang', @@ -1151,7 +1152,6 @@ local extension = { cygport = detect.bash, ebuild = detect.bash, eclass = detect.bash, - env = detect.sh, envrc = detect.sh, ksh = detect.ksh, sh = detect.sh, @@ -1627,6 +1627,7 @@ local filename = { Earthfile = 'earthfile', ['.editorconfig'] = 'editorconfig', ['elinks.conf'] = 'elinks', + ['.env'] = 'env', ['rebar.config'] = 'erlang', ['mix.lock'] = 'elixir', ['filter-rules'] = 'elmfilt', @@ -2652,11 +2653,13 @@ local pattern = { ['^%.cshrc'] = detect.csh, ['^%.login'] = detect.csh, ['^%.notmuch%-config%.'] = 'dosini', + ['^%.env%.'] = 'env', ['^%.gitsendemail%.msg%.......$'] = 'gitsendemail', ['^%.kshrc'] = detect.ksh, ['^%.article%.%d+$'] = 'mail', ['^%.letter%.%d+$'] = 'mail', ['^%.reminders'] = starsetf('remind'), + ['^%.envrc%.'] = detect.sh, ['^%.tcshrc'] = detect.tcsh, ['^%.zcompdump'] = starsetf('zsh'), }, diff --git a/runtime/syntax/env.vim b/runtime/syntax/env.vim new file mode 100644 index 0000000000..a33eb045da --- /dev/null +++ b/runtime/syntax/env.vim @@ -0,0 +1,28 @@ +" Vim syntax file +" Language: env +" Maintainer: DuckAfire +" Last Change: 2026 Jan 27 +" Version: 2 +" Changelog: +" 0. Create syntax file. +" 1. Remove unused variable (g:main_syntax). +" 2. Apply changes required by github@dkearns + +if exists("b:current_syntax") + finish +endif + +syn match envField nextgroup=envValue /^\h\%(\w\|\.\)*/ +syn region envValue matchgroup=Operator start=/=/ end=/$/ +syn match envComment contains=envTodo,envTitles /^#.*$/ +syn keyword envTodo contained CAUTION NOTE TODO WARN WARNING +syn match envTitle contained /^\s*#\s*\zs[A-Z0-9][A-Z0-9 ]*:/ + +hi def link envField Identifier +hi def link envValue String +hi def link envComment Comment +hi def link envTodo Todo +hi def link envTitle PreProc + +let b:current_syntax = "env" + diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 7beb3d3734..bbaca148c3 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -278,6 +278,7 @@ func s:GetFilenameChecks() abort \ 'elmfilt': ['filter-rules'], \ 'elsa': ['file.lc'], \ 'elvish': ['file.elv'], + \ 'env': ['.env', '.env.file', 'file.env'], \ 'epuppet': ['file.epp'], \ 'erlang': ['file.erl', 'file.hrl', 'file.yaws', 'file.app.src', 'rebar.config'], \ 'eruby': ['file.erb', 'file.rhtml'], @@ -732,7 +733,7 @@ func s:GetFilenameChecks() abort \ 'sh': ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '.bash_history', '.bash-history', \ '/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', '.env', '.envrc', 'devscripts.conf', + \ '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'], \ 'shaderslang': ['file.slang'], \ 'sieve': ['file.siv', 'file.sieve'],