Address BufWritePost error, fixes #573

This commit is contained in:
Adam Stankiewicz
2020-10-04 19:00:16 +02:00
parent 073e4d44be
commit d221139bd7
3 changed files with 36 additions and 63 deletions

View File

@@ -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