mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-11 04:53:51 -05:00
Detect filetype only if not set, fixes #656
This commit is contained in:
@@ -2662,11 +2662,11 @@ func! s:Observe(fn)
|
||||
let b:PolyglotObserve = function("polyglot#" . a:fn)
|
||||
augroup polyglot-observer
|
||||
au!
|
||||
au CursorHold,CursorHoldI,BufWritePost <buffer> call b:PolyglotObserve()
|
||||
au CursorHold,CursorHoldI <buffer> call b:PolyglotObserve()
|
||||
augroup END
|
||||
endfunc
|
||||
|
||||
au BufNewFile,BufRead,StdinReadPost,BufWritePost * if expand("<afile>:e") == "" |
|
||||
au BufNewFile,BufRead,StdinReadPost,BufWritePost * if (&ft == "" || &ft == "conf") && expand("<afile>:e") == "" |
|
||||
\ call polyglot#shebang#Detect() | endif
|
||||
|
||||
au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" |
|
||||
|
||||
Reference in New Issue
Block a user