From e5ef736dfe7a86358bf399257ecd24c08ab5f0cb Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 15 Nov 2021 23:02:33 +0100 Subject: [PATCH] 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.