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:
committed by
Christian Brabandt
parent
52f2ff0363
commit
0d4d23dac0
4
runtime/autoload/dist/script.vim
vendored
4
runtime/autoload/dist/script.vim
vendored
@@ -229,6 +229,10 @@ export def Exe2filetype(name: string, line1: string): string
|
|||||||
elseif name =~ '^execlineb\>'
|
elseif name =~ '^execlineb\>'
|
||||||
return 'execline'
|
return 'execline'
|
||||||
|
|
||||||
|
# Vim
|
||||||
|
elseif name =~ '^vim\>'
|
||||||
|
return 'vim'
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
|
@@ -994,6 +994,7 @@ def s:GetScriptChecks(): dict<list<list<string>>>
|
|||||||
['#!/path/regina']],
|
['#!/path/regina']],
|
||||||
janet: [['#!/path/janet']],
|
janet: [['#!/path/janet']],
|
||||||
dart: [['#!/path/dart']],
|
dart: [['#!/path/dart']],
|
||||||
|
vim: [['#!/path/vim']],
|
||||||
}
|
}
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
492,
|
||||||
/**/
|
/**/
|
||||||
491,
|
491,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user