Fix shortcuts in plugins, fixes #566

This commit is contained in:
Adam Stankiewicz
2020-10-24 16:54:55 +02:00
parent e3609fed6b
commit b6654c85b2

View File

@@ -25,14 +25,6 @@ let did_load_filetypes = 1
" Be consistent across different systems
set nofileignorecase
func! s:Observe(fn)
let b:PolyglotObserve = function("polyglot#" . a:fn)
augroup polyglot-observer
au! CursorHold,CursorHoldI,BufWritePost <buffer>
\ if b:PolyglotObserve() | au! polyglot-observer | endif
augroup END
endfunc
let s:disabled_packages = {}
let s:new_polyglot_disabled = []
@@ -112,6 +104,8 @@ func! s:StarSetf(ft)
endif
endfunc
augroup polyglot-observer | augroup END
augroup filetypedetect
" Load user-defined filetype.vim and oter plugins ftdetect first
@@ -2621,12 +2615,22 @@ endif
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
au! BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
func! s:Observe(fn)
let b:PolyglotObserve = function("polyglot#" . a:fn)
augroup polyglot-observer
au!
au CursorHold,CursorHoldI,BufWritePost <buffer> call b:PolyglotObserve()
augroup END
endfunc
au BufNewFile,BufRead,StdinReadPost * if expand("<afile>:e") == "" |
\ call polyglot#shebang#Detect() | endif
au BufEnter * if &ft == "" && expand("<afile>:e") == "" |
au BufWinEnter * if &ft == "" && expand("<afile>:e") == "" |
\ call s:Observe('shebang#Detect') | endif
au FileType * au! polyglot-observer
augroup END