Mercurial > vim
changeset 13182:181ddaf5e467 v8.0.1465
patch 8.0.1465: python2 and python3 detection not tested
commit https://github.com/vim/vim/commit/4bc0bed53695ac67db8d601f2a15e48e7a196688
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 3 22:35:40 2018 +0100
patch 8.0.1465: python2 and python3 detection not tested
Problem: Python2 and python3 detection not tested. (Matej Cepl)
Solution: Add test for detecting python2 and python3. Also detect a script
using "js" as javascript.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 03 Feb 2018 22:45:05 +0100 |
parents | 6e5fd667df85 |
children | 583679d18392 |
files | runtime/scripts.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/scripts.vim +++ b/runtime/scripts.vim @@ -137,7 +137,7 @@ if s:line1 =~# "^#!" set ft=ruby " JavaScript - elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>' + elseif s:name =~# 'node\(js\)\=\>\|js\>' || s:name =~# 'rhino\>' set ft=javascript " BC calculator
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -561,10 +561,13 @@ let s:script_checks = { \ 'perl6': [['#!/path/perl6']], \ 'perl': [['#!/path/perl']], \ 'php': [['#!/path/php']], - \ 'python': [['#!/path/python']], + \ 'python': [['#!/path/python'], + \ ['#!/path/python2'], + \ ['#!/path/python3']], \ 'groovy': [['#!/path/groovy']], \ 'ruby': [['#!/path/ruby']], \ 'javascript': [['#!/path/node'], + \ ['#!/path/js'], \ ['#!/path/nodejs'], \ ['#!/path/rhino']], \ 'bc': [['#!/path/bc']],