diff options
Diffstat (limited to 'ftplugin/dhall.vim')
-rw-r--r-- | ftplugin/dhall.vim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ftplugin/dhall.vim b/ftplugin/dhall.vim index d09f4c31..c5553f49 100644 --- a/ftplugin/dhall.vim +++ b/ftplugin/dhall.vim @@ -34,14 +34,16 @@ endif function! DhallFormat() let cursor = getpos('.') - exec 'silent %!dhall format' + exec 'normal! gg' + exec 'silent !dhall format --inplace ' . expand('%') + exec 'e' call setpos('.', cursor) endfunction if exists('g:dhall_format') if g:dhall_format == 1 augroup dhall - au BufWritePre *.dhall call DhallFormat() + au BufWritePost *.dhall call DhallFormat() augroup END endif endif |