package publish

This commit is contained in:
Vanessa McHale 2019-03-01 20:19:38 -06:00
parent f69e3b6254
commit 1a17a32e81
1 changed files with 11 additions and 0 deletions

View File

@ -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()