]> granicus.if.org Git - vim/commitdiff
patch 8.2.1409: nmpmrc and php.ini filetypes not recognized v8.2.1409
authorBram Moolenaar <Bram@vim.org>
Sun, 9 Aug 2020 17:32:39 +0000 (19:32 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 9 Aug 2020 17:32:39 +0000 (19:32 +0200)
Problem:    Nmpmrc and php.ini filetypes not recognized.
Solution:   Add filetype detection. (Doug Kearns)

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

index 106eb37919a411e89eee7171edf67565ce902653..dfbfaabaec3e69b020b5b315b921d185a773fc82 100644 (file)
@@ -1093,6 +1093,9 @@ au BufNewFile,BufRead .netrc                      setf netrc
 " Ninja file
 au BufNewFile,BufRead *.ninja                  setf ninja
 
+" NPM RC file
+au BufNewFile,BufRead npmrc,.npmrc             setf dosini
+
 " Novell netware batch files
 au BufNewFile,BufRead *.ncf                    setf ncf
 
@@ -1199,6 +1202,9 @@ au BufNewFile,BufRead *.pod6                      setf pod6
 " Also .ctp for Cake template file
 au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp      setf php
 
+" PHP config
+au BufNewFile,BufRead php.ini,php.ini-*                setf dosini
+
 " Pike and Cmod
 au BufNewFile,BufRead *.pike,*.pmod            setf pike
 au BufNewFile,BufRead *.cmod                   setf cmod
index 2e517c0bb9753ceea70edf025509474fc9563546..cd72008173d029d5e52dae394acf5b9a79fd37b9 100644 (file)
@@ -140,7 +140,7 @@ let s:filename_checks = {
     \ 'dnsmasq': ['/etc/dnsmasq.conf'],
     \ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile'],
     \ 'dosbatch': ['file.bat', 'file.sys'],
-    \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini'],
+    \ 'dosini': ['.editorconfig', '/etc/pacman.conf', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5'],
     \ 'dot': ['file.dot', 'file.gv'],
     \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe'],
     \ 'dsl': ['file.dsl'],
index b7667bf4c6bb504b15460e800264baf68f437574..0cd89d67a23044b15d3fe222f6540d2c1e7587e9 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1409,
 /**/
     1408,
 /**/