1
0
forked from aniani/vim

patch 9.1.0492: filetype: Vim-script files not detected by shebang line

Problem:  Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)

closes: #15012

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Doug Kearns
2024-06-16 08:32:15 +02:00
committed by Christian Brabandt
parent 52f2ff0363
commit 0d4d23dac0
3 changed files with 7 additions and 0 deletions

View File

@@ -229,6 +229,10 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^execlineb\>'
return 'execline'
# Vim
elseif name =~ '^vim\>'
return 'vim'
endif
return ''

View File

@@ -994,6 +994,7 @@ def s:GetScriptChecks(): dict<list<list<string>>>
['#!/path/regina']],
janet: [['#!/path/janet']],
dart: [['#!/path/dart']],
vim: [['#!/path/vim']],
}
enddef

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
492,
/**/
491,
/**/