]> granicus.if.org Git - vim/commitdiff
patch 9.0.1167: EditorConfig files do not have their own filetype v9.0.1167
authorGregory Anders <greg@gpanders.com>
Mon, 9 Jan 2023 20:08:00 +0000 (20:08 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 9 Jan 2023 20:08:00 +0000 (20:08 +0000)
Problem:    EditorConfig files do not have their own filetype.
Solution:   Add the "editorconfig" filetype. (Gregory Anders, closes #11779)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index c659de8477eb4ede34e4fc705eb879cea0d952a5..22f6d1c41e49fc1affb989c31a0ae84670ac6758 100644 (file)
@@ -606,8 +606,8 @@ au BufNewFile,BufRead *.edn
        \   setf clojure |
        \ endif
 
-" EditorConfig (close enough to dosini)
-au BufNewFile,BufRead .editorconfig            setf dosini
+" EditorConfig
+au BufNewFile,BufRead .editorconfig            setf editorconfig
 
 " Embedix Component Description
 au BufNewFile,BufRead *.ecd                    setf ecd
index 77e68c7ea0f72fe8750afc082770d68f04cda432..9dfb1a49209ae5fe69e3148941641ff64c71deb2 100644 (file)
@@ -160,7 +160,7 @@ let s:filename_checks = {
     \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
     \ 'dockerfile': ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
     \ 'dosbatch': ['file.bat'],
-    \ 'dosini': ['.editorconfig', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'],
+    \ 'dosini': ['/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'],
     \ 'dot': ['file.dot', 'file.gv'],
     \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
     \ 'dtd': ['file.dtd'],
@@ -172,6 +172,7 @@ let s:filename_checks = {
     \ 'dylanlid': ['file.lid'],
     \ 'ecd': ['file.ecd'],
     \ 'edif': ['file.edf', 'file.edif', 'file.edo'],
+    \ 'editorconfig': ['.editorconfig'],
     \ 'eelixir': ['file.eex', 'file.leex'],
     \ 'elinks': ['elinks.conf'],
     \ 'elixir': ['file.ex', 'file.exs', 'mix.lock'],
index 6bddfff3c29c151935bb51a5f6f7f6bfd9bddcad..a218a71a0851d3d333e0450b6780aba1a773bf9f 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1167,
 /**/
     1166,
 /**/