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