summaryrefslogtreecommitdiffstats
path: root/ftdetect
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-12-29 23:40:05 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2020-12-29 23:40:05 +0100
commit1150adc4db99fc4f88f0a5ebebe2f9033784209c (patch)
tree35aa09f7e5c253e06e1d7b95228e5e418b65e640 /ftdetect
parent47dcae9131ac32cabf92f49093f044732a412450 (diff)
downloadvim-polyglot-1150adc4db99fc4f88f0a5ebebe2f9033784209c.tar.gz
vim-polyglot-1150adc4db99fc4f88f0a5ebebe2f9033784209c.zip
Fix detecting conf filetype, closes #641
Diffstat (limited to 'ftdetect')
-rw-r--r--ftdetect/polyglot.vim7
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'))