signature_block.vim: remove trailing spaces on empty lines
[vim/signature_block.vim.git] / plugin / signature_block.vim
index d7eb8e0..8d19134 100644 (file)
 " map <Leader>R :call ReplaceAllSignatures('~/.signature')<CR>
 "
 " " Append a signature block to all e-mails
-" autocmd FileType mail silent call AddSignature('~/.signature') | w
+" autocmd FileType mail if AddSignature('~/.signature') | w | endif
 "
-" " Append a signature block to cover letters generated with git-format-patch
-" autocmd BufRead 0000-cover-letter.patch silent call AddSignature('~/.signature') | w
+" " Replace the git version with a signature in cover letters generated with git-format-patch
+" autocmd BufRead 0000-cover-letter.patch if ReplaceLastSignature('~/.signature') | w | endif
 " autocmd BufRead 0000-cover-letter.patch autocmd! BufRead 0000-cover-letter.patch
 "
 " References:
@@ -105,7 +105,7 @@ func! ReplaceAllSignatures(sigfile)
        endtry
 
        call AppendSignature(a:sigfile)
-       
+
        " restore cursor position from mark 'z' if the mark is still valid
        silent! normal `z
 
@@ -133,7 +133,7 @@ func! ReplaceLastSignature(sigfile)
        endtry
 
        call AppendSignature(a:sigfile)
-       
+
        " restore cursor position from mark 'z' if the mark is still valid
        silent! normal `z