From 1a17a32e813ef5c3baa308563384219ec3422215 Mon Sep 17 00:00:00 2001 From: Vanessa McHale Date: Fri, 1 Mar 2019 20:19:38 -0600 Subject: [PATCH] package publish --- ftplugin/ats.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ftplugin/ats.vim b/ftplugin/ats.vim index 24383cc..0c60561 100644 --- a/ftplugin/ats.vim +++ b/ftplugin/ats.vim @@ -50,6 +50,17 @@ if g:ats_autoformat == 1 augroup END endif +function! StripTrailingWhitespace() + let myline=line('.') + let mycolumn = col('.') + exec 'silent %s/ *$//' + call cursor(myline, mycolumn) +endfunction + +augroup ats + au BufWritePre *.dats,*.sats,*.hats silent! call StripTrailingWhitespace() +augroup END + " commands command! -nargs=0 Format call AtsFormat()