diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 113453af..198e334c 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2662,11 +2662,11 @@ func! s:Observe(fn) let b:PolyglotObserve = function("polyglot#" . a:fn) augroup polyglot-observer au! - au CursorHold,CursorHoldI,BufWritePost call b:PolyglotObserve() + au CursorHold,CursorHoldI call b:PolyglotObserve() augroup END endfunc -au BufNewFile,BufRead,StdinReadPost,BufWritePost * if expand(":e") == "" | +au BufNewFile,BufRead,StdinReadPost,BufWritePost * if (&ft == "" || &ft == "conf") && expand(":e") == "" | \ call polyglot#shebang#Detect() | endif au BufWinEnter * if &ft == "" && expand(":e") == "" |