mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-15 06:53:50 -05:00
Address BufWritePost error, fixes #573
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
func! s:WritePostOnce(fn)
|
||||
exe 'au! filetypedetect BufWritePost <buffer> au! filetypedetect BufWritePost <buffer> | ' . a:fn
|
||||
endfunc
|
||||
|
||||
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
func! polyglot#detect#Inp()
|
||||
@@ -193,9 +189,7 @@ func! polyglot#detect#Pm()
|
||||
let &ft = g:filetype_pm | return
|
||||
endif
|
||||
if polyglot#shebang#Detect() | return | endif
|
||||
setf perl
|
||||
call s:WritePostOnce('call polyglot#detect#Pm()')
|
||||
return
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Pl()
|
||||
@@ -216,9 +210,7 @@ func! polyglot#detect#Pl()
|
||||
let &ft = g:filetype_pl | return
|
||||
endif
|
||||
if polyglot#shebang#Detect() | return | endif
|
||||
setf perl
|
||||
call s:WritePostOnce('call polyglot#detect#Pl()')
|
||||
return
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#T()
|
||||
@@ -241,9 +233,7 @@ func! polyglot#detect#T()
|
||||
let &ft = g:filetype_t | return
|
||||
endif
|
||||
if polyglot#shebang#Detect() | return | endif
|
||||
setf perl
|
||||
call s:WritePostOnce('call polyglot#detect#T()')
|
||||
return
|
||||
set ft=perl | return
|
||||
endfunc
|
||||
|
||||
func! polyglot#detect#Tt2()
|
||||
@@ -270,9 +260,7 @@ func! polyglot#detect#Html()
|
||||
set ft=xhtml | return
|
||||
endif
|
||||
endfor
|
||||
setf html
|
||||
call s:WritePostOnce('call polyglot#detect#Html()')
|
||||
return
|
||||
set ft=html | return
|
||||
endfunc
|
||||
|
||||
" DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE
|
||||
|
||||
Reference in New Issue
Block a user