Merge pull request #16330 from clason/vim-8.2.3598

vim-patch:8.2.3598,3599,3600: some filetypes are not recognized
This commit is contained in:
Christian Clason 2021-11-16 13:38:07 +01:00 committed by GitHub
commit 890f8cd750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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.