# HG changeset patch # User Bram Moolenaar # Date 1611498605 -3600 # Node ID 002fd1de096880e27277b54def768f8058590e9c # Parent 8c3997ad6088112fbdb9da2047b88f8c773e0519 patch 8.2.2402: some filetypes not detected Commit: https://github.com/vim/vim/commit/8323cab31c3120a7f80cf3271a506a30ec04d99e Author: Bram Moolenaar Date: Sun Jan 24 15:25:56 2021 +0100 patch 8.2.2402: some filetypes not detected Problem: Some filetypes not detected. Solution: Detect Ruby Signature and Puppet related files. (Doug Kearns) diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1176,9 +1176,10 @@ au BufNewFile,BufRead *.papp,*.pxml,*.px " 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 r " 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,* " 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 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 @@ -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'], diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2402, +/**/ 2401, /**/ 2400,