Commit: patch 9.1.0317: filetype: matplotlibrc files are not recognized

4 views
Skip to first unread message

Christian Brabandt

unread,
Apr 13, 2024, 12:30:13 PMApr 13
to vim...@googlegroups.com
patch 9.1.0317: filetype: matplotlibrc files are not recognized

Commit: https://github.com/vim/vim/commit/55d4f3c006689945599589a90036923b1752754f
Author: Wu, Zhenyu <wuzh...@ustc.edu>
Date: Sat Apr 13 18:25:38 2024 +0200

patch 9.1.0317: filetype: matplotlibrc files are not recognized

Problem: filetype: matplotlibrc files are not recognized
Solution: Detect 'matplotlibrc' file as yaml filetype
(Wu, Zhenyu)

See: https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file

closes: #14501

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 79a9b481f..96ecb1aaa 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -425,8 +425,8 @@ au BufNewFile,BufRead .clang-format setf yaml
" Clang-tidy
au BufNewFile,BufRead .clang-tidy setf yaml

-" Matplotlib style
-au BufNewFile,BufRead *.mplstyle setf yaml
+" Matplotlib
+au BufNewFile,BufRead *.mplstyle,matplotlibrc setf yaml

" Clean
au BufNewFile,BufRead *.dcl,*.icl setf clean
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 25f3224b7..3d513907c 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -836,7 +836,7 @@ def s:GetFilenameChecks(): dict<list<string>>
xsd: ['file.xsd'],
xslt: ['file.xsl', 'file.xslt'],
yacc: ['file.yy', 'file.yxx', 'file.y++'],
- yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'yarn.lock'],
+ yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock'],
yang: ['file.yang'],
yuck: ['file.yuck'],
z8a: ['file.z8a'],
diff --git a/src/version.c b/src/version.c
index 0d48833a3..8b2372402 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 */
+/**/
+ 317,
/**/
316,
/**/
Reply all
Reply to author
Forward
0 new messages