command added
This commit is contained in:
parent
4bfd5c332c
commit
333e88bdeb
@ -1,5 +1,5 @@
|
|||||||
"Function for formatting the entire buffer
|
"Function for formatting the entire buffer
|
||||||
function! g:Autoformat()
|
function! s:Autoformat()
|
||||||
"If a formatprg is specified
|
"If a formatprg is specified
|
||||||
if &formatprg!=""
|
if &formatprg!=""
|
||||||
"echo "formatprg is: ".&formatprg
|
"echo "formatprg is: ".&formatprg
|
||||||
@ -13,3 +13,6 @@ function! g:Autoformat()
|
|||||||
echo "No formatter installed for this filetype"
|
echo "No formatter installed for this filetype"
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
"Create a command for this
|
||||||
|
command Autoformat call s:Autoformat()
|
||||||
|
Loading…
Reference in New Issue
Block a user