From d40b2afda8256be4dd91c58ccbb6220a2ca5490f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 20 Apr 2022 09:50:14 +0200 Subject: vim-patch:8.2.4781: Maxima files are not recognized Problem: Maxima files are not recognized. Solution: Add patterns to detect Maxima files. (Doron Behar, closes vim/vim#10211) https://github.com/vim/vim/commit/d0a20c9d111da75febb60ffee2e15f727ab6a5ad --- runtime/filetype.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 08dfe6223f..978812795d 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -154,6 +154,10 @@ au BufNewFile,BufRead *.asp " Grub (must be before catch *.lst) au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub +" Maxima, see: +" https://maxima.sourceforge.io/docs/manual/maxima_71.html#file_005ftype_005fmaxima +au BufNewFile,BufRead *.mc,*.demo,*.dem,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima + " Assembly (all kinds) " *.lst is not pure assembly, it has two extra columns (address, byte codes) au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm() -- cgit From 63eb7e865b3c702d09bfa475587f646722996a56 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 20 Apr 2022 09:50:32 +0200 Subject: vim-patch:8.2.4793: recognizing Maxima filetype even though it might be another Problem: Recognizing Maxima filetype even though it might be another. Solution: Remove *.mc and *.dem patterns from Maxima files https://github.com/vim/vim/commit/928a13135629fa8e73796760077b1b877918a080 --- runtime/filetype.vim | 12 ++++++++---- runtime/lua/vim/filetype.lua | 7 +++++++ 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 978812795d..e72d6fc0c0 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -151,18 +151,21 @@ au BufNewFile,BufRead *.asp \ setf aspvbs | \ endif -" Grub (must be before catch *.lst) +" Grub (must be before pattern *.lst) au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf setf grub " Maxima, see: " https://maxima.sourceforge.io/docs/manual/maxima_71.html#file_005ftype_005fmaxima -au BufNewFile,BufRead *.mc,*.demo,*.dem,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima +" Must be before the pattern *.mac. +" *.dem omitted - also used by gnuplot demos +" *.mc omitted - used by dist#ft#McSetf() +au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima " Assembly (all kinds) " *.lst is not pure assembly, it has two extra columns (address, byte codes) au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm() -" Macro (VAX) +" Assembly - Macro (VAX) au BufNewFile,BufRead *.mar setf vmasm " Atlas @@ -1678,7 +1681,8 @@ au BufNewFile,BufRead *.siv,*.sieve setf sieve " Sendmail au BufNewFile,BufRead sendmail.cf setf sm -" Sendmail .mc files are actually m4. Could also be MS Message text file. +" Sendmail .mc files are actually m4. Could also be MS Message text file or +" Maxima. au BufNewFile,BufRead *.mc call dist#ft#McSetf() " Services diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index ac36210b23..d575869377 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -389,6 +389,12 @@ local extension = { mason = "mason", master = "master", mas = "master", + demo = "maxima", + dm1 = "maxima", + dm2 = "maxima", + dm3 = "maxima", + dmt = "maxima", + wxm = "maxima", mel = "mel", mf = "mf", mgl = "mgl", @@ -1013,6 +1019,7 @@ local filename = { [".mailcap"] = "mailcap", ["/etc/man.conf"] = "manconf", ["man.config"] = "manconf", + ["maxima-init.mac"] = "maxima", ["meson.build"] = "meson", ["meson_options.txt"] = "meson", ["/etc/conf.modules"] = "modconf", -- cgit