mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-11 13:03:50 -05:00
Fix shortcuts in plugins, fixes #566
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user