]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0317: filetype: matplotlibrc files are not recognized v9.1.0317
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sat, 13 Apr 2024 16:25:38 +0000 (18:25 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 13 Apr 2024 16:25:38 +0000 (18:25 +0200)
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 <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 79a9b481fd924b1e5b575a8a7100666a3e77725d..96ecb1aaae905449a4d49f3d99b18a499ce80b3a 100644 (file)
@@ -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
index 25f3224b7feb2b16f8ec4668dc96bb8f41237b84..3d513907c0c85a55602d5d517a03613e59287623 100644 (file)
@@ -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'],
index 0d48833a314a90d27f0b77218f3c3862ca5248d7..8b23724020b8df3cbaf031add545b6049477f733 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    317,
 /**/
     316,
 /**/