formatprg only set when b:formatprg exists

This commit is contained in:
Chiel92 2013-02-08 20:58:43 +01:00
parent a4724c5dac
commit 546e181dab

View File

@ -34,8 +34,6 @@ function! g:FindFormatter(name, args)
endfunction
"formatprg is a global option
"So when buffer/window/tab changes, (re)load formatprg from the bufferlocal
"variable
au BufEnter,WinEnter * let &formatprg=b:formatprg
"Default value for b:formatprg is empty string
let b:formatprg = ""
"So when buffer/window/tab changes,
"(re)load formatprg from the bufferlocal variable
au BufEnter,WinEnter * if exists("b:formatprg") | let &formatprg=b:formatprg