package publish

This commit is contained in:
Vanessa McHale 2017-12-23 14:54:08 -06:00
parent 44f52e4602
commit f979936b8a

View file

@ -14,9 +14,11 @@ au BufNewFile,BufRead *.*ats
setlocal commentstring=(*\ %s\ *) setlocal commentstring=(*\ %s\ *)
function! AtsFormat() function! AtsFormat()
let cursor = getpos('.')
exec 'normal! gg' exec 'normal! gg'
exec 'silent !atsfmt -i ' . expand('%') exec 'silent !atsfmt -i ' . expand('%')
exec 'e' exec 'e'
call setpos('.', cursor)
endfunction endfunction
if g:ats_autoformat == 1 if g:ats_autoformat == 1