From f979936b8ac972ba7f4b01ff4ec15f8dd168dbcf Mon Sep 17 00:00:00 2001 From: Vanessa McHale Date: Sat, 23 Dec 2017 14:54:08 -0600 Subject: [PATCH] package publish --- ftplugin/ats.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ftplugin/ats.vim b/ftplugin/ats.vim index 9071bfe..91ea825 100644 --- a/ftplugin/ats.vim +++ b/ftplugin/ats.vim @@ -14,9 +14,11 @@ au BufNewFile,BufRead *.*ats setlocal commentstring=(*\ %s\ *) function! AtsFormat() + let cursor = getpos('.') exec 'normal! gg' exec 'silent !atsfmt -i ' . expand('%') exec 'e' + call setpos('.', cursor) endfunction if g:ats_autoformat == 1