added format on write
This commit is contained in:
parent
489e3522d7
commit
46b7b8db45
|
@ -1 +1,16 @@
|
|||
setlocal commentstring=//\ %s
|
||||
|
||||
function Hbformat()
|
||||
silent! !hbc --fmt-stdout <afile>
|
||||
if v:shell_error
|
||||
echom "Errors in file"
|
||||
!hbc --fmt-stdout <afile>
|
||||
else
|
||||
silent! %!hbc --fmt-stdout <afile>
|
||||
endif
|
||||
endfunction
|
||||
|
||||
augroup hblang_group
|
||||
autocmd!
|
||||
autocmd BufWritePost *.hb :call Hbformat()
|
||||
augroup END
|
||||
|
|
Loading…
Reference in a new issue