From f95026252c5a31242903a98c741887696dfbb11f Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 27 Sep 2019 19:47:32 +0200 Subject: Update everything, closes #435 --- ftdetect/polyglot.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ftdetect') diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 0060dfd6..bec614ae 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -276,6 +276,15 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 augroup filetypedetect " dart, from dart.vim in dart-lang/dart-vim-plugin autocmd BufRead,BufNewFile *.dart set filetype=dart + +function! s:DetectShebang() + if did_filetype() | return | endif + if getline(1) == '#!/usr/bin/env dart' + setlocal filetype=dart + endif +endfunction + +autocmd BufRead * call s:DetectShebang() augroup end endif @@ -1047,6 +1056,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 augroup filetypedetect " puppet, from puppet.vim in rodjek/vim-puppet au! BufRead,BufNewFile *.pp setfiletype puppet +au! BufRead,BufNewFile *.epp setfiletype embeddedpuppet au! BufRead,BufNewFile Puppetfile setfiletype ruby augroup end endif -- cgit v1.2.3