Commit: patch 9.2.0027: filetype: yara files are not recognized

0 views
Skip to first unread message

Christian Brabandt

unread,
11:46 AM (4 hours ago) 11:46 AM
to vim...@googlegroups.com
patch 9.2.0027: filetype: yara files are not recognized

Commit: https://github.com/vim/vim/commit/7d93ae57f0dc9da7eee8d582dd0d5a22922ffed8
Author: Thomas Dupuy <thom...@gmail.com>
Date: Thu Feb 19 16:12:06 2026 +0000

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: #19460

Signed-off-by: Thomas Dupuy <thom...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index d5bd636bd..30f3c1460 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
-# Last Change: 2026 Feb 18
+# Last Change: 2026 Feb 19
# Former Maintainer: Bram Moolenaar <Br...@vim.org>

# These functions are moved here from runtime/filetype.vim to make startup
@@ -3017,6 +3017,9 @@ const ft_from_ext = {
"raml": "raml",
# YANG
"yang": "yang",
+ # YARA, YARA-X
+ "yara": "yara",
+ "yar": "yara",
# Yuck
"yuck": "yuck",
# Zimbu
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 82caa2baf..8da2b8f8a 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -987,6 +987,7 @@ def s:GetFilenameChecks(): dict<list<string>>
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'],
diff --git a/src/version.c b/src/version.c
index 2a85c543d..4744ccf22 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =

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