command added

This commit is contained in:
Chiel92 2012-12-02 15:27:50 +01:00
parent 4bfd5c332c
commit 333e88bdeb

View File

@ -1,5 +1,5 @@
"Function for formatting the entire buffer
function! g:Autoformat()
function! s:Autoformat()
"If a formatprg is specified
if &formatprg!=""
"echo "formatprg is: ".&formatprg
@ -13,3 +13,6 @@ function! g:Autoformat()
echo "No formatter installed for this filetype"
endif
endfunction
"Create a command for this
command Autoformat call s:Autoformat()