]> granicus.if.org Git - vim/commitdiff
patch 8.2.2402: some filetypes not detected v8.2.2402
authorBram Moolenaar <Bram@vim.org>
Sun, 24 Jan 2021 14:25:56 +0000 (15:25 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 24 Jan 2021 14:25:56 +0000 (15:25 +0100)
Problem:    Some filetypes not detected.
Solution:   Detect Ruby Signature and Puppet related files. (Doug Kearns)

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

index 1e365ec0811f56cea959ba7497c51d6d46ae6fb9..897ac80ebc20ed4e831657f5cdb1d0ed53aa6909 100644 (file)
@@ -1176,9 +1176,10 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl       setf papp
 " Password file
 au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
 
-" Pascal (also *.p)
+" Pascal (also *.p, *.pp, *.inc)
 au BufNewFile,BufRead *.pas                    setf pascal
 
+" Pascal or Puppet manifest
 au BufNewFile,BufRead *.pp                     call dist#ft#FTpp()
 
 " Delphi or Lazarus program file
@@ -1269,7 +1270,7 @@ au BufNewFile,BufRead *.pov                       setf pov
 " Povray configuration
 au BufNewFile,BufRead .povrayrc                        setf povini
 
-" Povray, PHP or assembly
+" Povray, Pascal, PHP or assembly
 au BufNewFile,BufRead *.inc                    call dist#ft#FTinc()
 
 " Printcap and Termcap
@@ -1278,13 +1279,19 @@ au BufNewFile,BufRead *printcap
 au BufNewFile,BufRead *termcap
        \ let b:ptcap_type = "term" | setf ptcap
 
-" PCCTS / ANTRL
-"au BufNewFile,BufRead *.g                     setf antrl
+" PCCTS / ANTLR
+"au BufNewFile,BufRead *.g                     setf antlr
 au BufNewFile,BufRead *.g                      setf pccts
 
 " PPWizard
 au BufNewFile,BufRead *.it,*.ih                        setf ppwiz
 
+" Puppet
+au BufNewFile,BufRead Puppetfile               setf ruby
+
+" Embedded Puppet
+au BufNewFile,BufRead *.epp                    setf epuppet
+
 " Obj 3D file format
 " TODO: is there a way to avoid MS-Windows Object files?
 au BufNewFile,BufRead *.obj                    setf obj
@@ -1427,8 +1434,8 @@ au BufNewFile,BufRead *.rb,*.rbw          setf ruby
 " RubyGems
 au BufNewFile,BufRead *.gemspec                        setf ruby
 
-" Rust
-au BufNewFile,BufRead *.rs                     setf rust
+" RBS (Ruby Signature)
+au BufNewFile,BufRead *.rbs                    setf rbs
 
 " Rackup
 au BufNewFile,BufRead *.ru                     setf ruby
@@ -1442,6 +1449,9 @@ au BufNewFile,BufRead *.builder,*.rxml,*.rjs      setf ruby
 " Rantfile and Rakefile is like Ruby
 au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake    setf ruby
 
+" Rust
+au BufNewFile,BufRead *.rs                     setf rust
+
 " S-lang (or shader language, or SmallLisp)
 au BufNewFile,BufRead *.sl                     setf slang
 
index 2d667a297a63966c655176762878e58ba15f6ae1..4104ec2b327711fd64ae43dde718c9193ed4d96e 100644 (file)
@@ -162,6 +162,7 @@ let s:filename_checks = {
     \ 'elinks': ['elinks.conf'],
     \ 'elm': ['file.elm'],
     \ 'elmfilt': ['filter-rules'],
+    \ 'epuppet': ['file.epp'],
     \ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'],
     \ 'eruby': ['file.erb', 'file.rhtml'],
     \ 'esmtprc': ['anyesmtprc', 'esmtprc', 'some-esmtprc'],
@@ -391,6 +392,7 @@ let s:filename_checks = {
     \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'],
     \ 'radiance': ['file.rad', 'file.mat'],
     \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
+    \ 'rbs': ['file.rbs'],
     \ 'rc': ['file.rc', 'file.rch'],
     \ 'rcs': ['file,v'],
     \ 'readline': ['.inputrc', 'inputrc'],
@@ -407,7 +409,7 @@ let s:filename_checks = {
     \ 'rpl': ['file.rpl'],
     \ 'rst': ['file.rst'],
     \ 'rtf': ['file.rtf'],
-    \ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file'],
+    \ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', 'Puppetfile'],
     \ 'rust': ['file.rs'],
     \ 'samba': ['smb.conf'],
     \ 'sas': ['file.sas'],
index 8786933fb23f0d61330194500986589e063c4f27..1a7994b9c80c4a0b20df5e7cbf9e087fb3ff5ba2 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2402,
 /**/
     2401,
 /**/