# HG changeset patch # User Christian Brabandt # Date 1720548008 -7200 # Node ID 0dc032c77f1ac8fafa6bc5791bb547df1226ac8d # Parent b3bacbfee6305aad9417dfbc9ab905b1e7d413cd patch 9.1.0553: filetype: *.mcmeta files are not recognized Commit: https://github.com/vim/vim/commit/d33a518025765c4a3530ad6cfb6cab83a30c8f55 Author: Tomodachi94 Date: Tue Jul 9 19:55:16 2024 +0200 patch 9.1.0553: filetype: *.mcmeta files are not recognized Problem: filetype: *.mcmeta files are not recognized Solution: Detect '*.mcmeta' files as json filetype (Tomodachi94) "pack.mcmeta" was added to the JSON tests because that is the most common filename with that extension. There are currently 34,000 instances of this file extension on GitHub: https://github.com/search?q=path%3A*.mcmeta&type=code&p=2 .zip files with this extension have downloads in the millions on sites like CurseForge: https://www.curseforge.com/minecraft/search?page=1&pageSize=20&sortBy=relevancy&class=texture-packs Further reading about the file extension: https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack#Creating_a_.MCMETA_file closes: #15189 Signed-off-by: Tomodachi94 Signed-off-by: Christian Brabandt diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1427,6 +1427,9 @@ au BufNewFile,BufRead *.mel setf mel " mbsync au BufNewFile,BufRead .mbsyncrc setf conf +" mcmeta +au BufNewFile,BufRead *.mcmeta setf json + " Mercurial (hg) commit file au BufNewFile,BufRead hg-editor-*.txt setf hgcommit diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -368,7 +368,7 @@ def s:GetFilenameChecks(): dict