diff options
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 3132a339..4d6935fe 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2659,13 +2659,13 @@ func! s:Observe(fn) augroup END endfunc -au BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" | +au BufNewFile,BufRead,StdinReadPost,BufWritePost * if expand("<afile>:e") == "" | \ call polyglot#shebang#Detect() | endif -au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" | +au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" | \ call s:Observe('shebang#Detect') | endif -au FileType * au! polyglot-observer +au BufWritePost * au! polyglot-observer augroup END @@ -3528,7 +3528,6 @@ if exists("did_load_filetypes") && exists("g:polyglot_disabled") runtime! extras/filetype.vim endif - let s:runtime = resolve($VIMRUNTIME) let s:base = resolve(expand('<sfile>:p:h:h')) |