diff options
-rw-r--r-- | runtime/filetype.vim | 5 | ||||
-rw-r--r-- | runtime/scripts.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 75354968e9..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 @@ -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/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 diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 18e59bb6b7..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'], @@ -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. |