diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-06-16 11:27:20 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-06-16 11:45:44 +0200 |
commit | 191a70f9dd347926bc74a9928fce388be0000248 (patch) | |
tree | 9d4578d03630e78469f30aae7d60d78d34adf8ba | |
parent | 57c377dfb203e8c7b2e736669f4ba986cc2ebbbd (diff) | |
download | rneovim-191a70f9dd347926bc74a9928fce388be0000248.tar.gz rneovim-191a70f9dd347926bc74a9928fce388be0000248.tar.bz2 rneovim-191a70f9dd347926bc74a9928fce388be0000248.zip |
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: vim/vim#15012
https://github.com/vim/vim/commit/0d4d23dac0a5a77ccb0ebf1dcf646afe0c6886bf
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
-rw-r--r-- | runtime/lua/vim/filetype/detect.lua | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index c56ece6289..fa90c83b81 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -1783,6 +1783,7 @@ local patterns_hashbang = { ['^janet\\>'] = { 'janet', { vim_regex = true } }, ['^dart\\>'] = { 'dart', { vim_regex = true } }, ['^execlineb\\>'] = { 'execline', { vim_regex = true } }, + ['^vim\\>'] = { 'vim', { vim_regex = true } }, } ---@private diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 8bbda1dc99..ec9d88d3bf 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -992,6 +992,7 @@ func s:GetScriptChecks() abort \ ['#!/path/regina']], \ 'janet': [['#!/path/janet']], \ 'dart': [['#!/path/dart']], + \ 'vim': [['#!/path/vim']], \ } endfunc |