prototype on-the-fly codeformatting

This commit is contained in:
Chiel92 2013-02-11 09:22:23 +01:00
parent b56875316f
commit 51f3b5f563

View File

@ -37,3 +37,8 @@ endfunction
"So when buffer/window/tab changes, "So when buffer/window/tab changes,
"(re)load formatprg from the bufferlocal variable "(re)load formatprg from the bufferlocal variable
au BufEnter,WinEnter * if exists("b:formatprg") | let &formatprg=b:formatprg au BufEnter,WinEnter * if exists("b:formatprg") | let &formatprg=b:formatprg
let b:autoformat = 1
if b:autoformat==1
inoremap <CR> <Esc>Vgqo
endif