vim-signify
vim-signify copied to clipboard
Remove trailing white spaces on the changed lines
I am switching from vim-gitgutter
to this new plugin, it is fast! Thanks.
But I am relying on following function to remove the trailing white spaces on the new added lines.
function! GlobalChangedLinesGutter(ex_cmd)
for hunk in GitGutterGetHunks()
for lnum in range(hunk[2], hunk[2]+hunk[3]-1)
let cursor = getcurpos()
silent! execute lnum.a:ex_cmd
call setpos('.', cursor)
endfor
endfor
endfunction
command! -nargs=1 Glines call GlobalChangedLinesGutter(<q-args>)
autocmd BufWritePre * :Glines s/\s\+$//e
Is there equivalent API available from vim-signify
to support this? Thanks.