vim-autoformat/plugin/autoformat.vim
2012-10-10 01:04:23 +02:00

10 lines
228 B
VimL

"Function for formatting the entire buffer
function! g:Autoformat()
"Save window state
let winview=winsaveview()
"Autoformat code
:silent exe "normal gggqG"
"Recall window state
call winrestview(winview)
endfunction