From e5ef736dfe7a86358bf399257ecd24c08ab5f0cb Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 15 Nov 2021 23:02:33 +0100 Subject: [PATCH 1/3] vim-patch:8.2.3598: RouterOS filetype is not recognized Problem: RouterOS filetype is not recognized. Solution: Add file and script patterns. (closes vim/vim#9097) https://github.com/vim/vim/commit/0818ab82e7058145366ebbe759f0b3f74724bdfd --- runtime/filetype.vim | 3 +++ src/nvim/testdir/test_filetype.vim | 2 ++ 2 files changed, 5 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 75354968e9..0ad19dd5fa 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1486,6 +1486,9 @@ au BufNewFile,BufRead robots.txt setf robots " Rpcgen au BufNewFile,BufRead *.x setf rpcgen +" MikroTik RouterOS script +au BufRead,BufNewFile *.rsc setf routeros + " reStructuredText Documentation Format au BufNewFile,BufRead *.rst setf rst diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 18e59bb6b7..7fc64e87f8 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -419,6 +419,7 @@ let s:filename_checks = { \ 'rnc': ['file.rnc'], \ 'rng': ['file.rng'], \ 'robots': ['robots.txt'], + \ 'routeros': ['file.rsc'], \ 'rpcgen': ['file.x'], \ 'rpl': ['file.rpl'], \ 'rst': ['file.rst'], @@ -659,6 +660,7 @@ let s:script_checks = { \ 'yaml': [['%YAML 1.2']], \ 'pascal': [['#!/path/instantfpc']], \ 'fennel': [['#!/path/fennel']], + \ 'routeros': [['#!/path/rsc']], \ } " Various forms of "env" optional arguments. From b20429c8a50fcdb100b3c6d83a48b8eb18227373 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Nov 2021 12:40:06 +0100 Subject: [PATCH 2/3] vim-patch:8.2.3599: not all gdbinit files are recognized Problem: Not all gdbinit files are recognized. Solution: Add "gdbinit". (Doug Kearns) https://github.com/vim/vim/commit/782b4bbc163e03ebe98d25bc62b9d82cba8f91a1 --- runtime/filetype.vim | 2 +- src/nvim/testdir/test_filetype.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 0ad19dd5fa..02faafc85f 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -643,7 +643,7 @@ au BufNewFile,BufRead *.fsl setf framescript au BufNewFile,BufRead fstab,mtab setf fstab " GDB command files -au BufNewFile,BufRead .gdbinit setf gdb +au BufNewFile,BufRead .gdbinit,gdbinit setf gdb " GDMO au BufNewFile,BufRead *.mo,*.gdmo setf gdmo diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 7fc64e87f8..cc8181c597 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -188,7 +188,7 @@ let s:filename_checks = { \ 'freebasic': ['file.fb', 'file.bi'], \ 'fstab': ['fstab', 'mtab'], \ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'], - \ 'gdb': ['.gdbinit'], + \ 'gdb': ['.gdbinit', 'gdbinit'], \ 'gdmo': ['file.mo', 'file.gdmo'], \ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'], \ 'gemtext': ['file.gmi', 'file.gemini'], From 75959d04c4ab9150907b707586930e4450d9e46d Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 16 Nov 2021 13:03:57 +0100 Subject: [PATCH 3/3] vim-patch:8.2.3600: filetype test fails Problem: Filetype test fails. Solution: Add missint change. https://github.com/vim/vim/commit/314b773abbb9b1ce0020d83482c6daf7ad6a42a2 --- runtime/scripts.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runtime/scripts.vim b/runtime/scripts.vim index 0b3fdc3514..79fd0a77e9 100644 --- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -190,6 +190,10 @@ if s:line1 =~# "^#!" elseif s:name =~# 'fennel\>' set ft=fennel + " MikroTik RouterOS script + elseif s:name =~# 'rsc\>' + set ft=routeros + endif unlet s:name @@ -390,6 +394,10 @@ else elseif s:line1 =~# '^%YAML' set ft=yaml + " MikroTik RouterOS script + elseif s:line1 =~# '^#.*by RouterOS.*$' + set ft=routeros + " CVS diff else let s:lnum = 1