]> granicus.if.org Git - vim/commitdiff
patch 8.2.3598: RouterOS filetype is not recognized v8.2.3598
authorzainin <thexsinner@gmail.com>
Mon, 15 Nov 2021 21:44:11 +0000 (21:44 +0000)
committerBram Moolenaar <Bram@vim.org>
Mon, 15 Nov 2021 21:44:11 +0000 (21:44 +0000)
Problem:    RouterOS filetype is not recognized.
Solution:   Add file and script patterns. (closes #9097)

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

index 3621f29e256dcef1d4787bcc84b66efd6577e4d5..befa21dc9a83b28f98a5c0247d23d9620c47e38b 100644 (file)
@@ -1493,6 +1493,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
 
index ef2ac8474cbdd7a735ccfeb4a6b649f0a038237e..de2b0f22c28cb6bc06b87509e18c6659932159af 100644 (file)
@@ -420,6 +420,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'],
@@ -660,6 +661,7 @@ let s:script_checks = {
       \ 'yaml': [['%YAML 1.2']],
       \ 'pascal': [['#!/path/instantfpc']],
       \ 'fennel': [['#!/path/fennel']],
+      \ 'routeros': [['#!/path/rsc']],
       \ }
 
 " Various forms of "env" optional arguments.
index 9cf0ee6396c1b833085e4c23c1aa92f8eaf937b5..7cffc01e2e4b18ba9e87ae94d5aaf7e589aeede6 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3598,
 /**/
     3597,
 /**/