diff options
author | Christian Clason <c.clason@uni-graz.at> | 2021-11-16 13:38:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-16 13:38:07 +0100 |
commit | 890f8cd750679381a66a2a12f0dda7096f59f8a0 (patch) | |
tree | a2317c7688a36db9aafb11ebe9ca6f1dd8d076a7 | |
parent | 87a053f126c79f5eeb1654e35beb31d9fe733163 (diff) | |
parent | 75959d04c4ab9150907b707586930e4450d9e46d (diff) | |
download | rneovim-890f8cd750679381a66a2a12f0dda7096f59f8a0.tar.gz rneovim-890f8cd750679381a66a2a12f0dda7096f59f8a0.tar.bz2 rneovim-890f8cd750679381a66a2a12f0dda7096f59f8a0.zip |
Merge pull request #16330 from clason/vim-8.2.3598
vim-patch:8.2.3598,3599,3600: some filetypes are not recognized
-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. |