From 6a0bdcf05c75fba2c466253cca2b0872a5686709 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Fri, 15 Aug 2008 09:53:06 +0000 Subject: [PATCH] added function to cleanup on leaving vim For now create a new, empty buffer before leaving to wipe out data on console. --- plugin/gnupg.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 309f487..ac6cc41 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -114,6 +114,9 @@ augroup GnuPG " undo the encryption so we are back in the normal text, directly " after the file has been written. autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) call s:GPGEncryptPost() + + " cleanup on leaving vim + autocmd VimLeave *.\(gpg\|asc\|pgp\) call s:GPGCleanup() augroup END " Section: Highlight setup {{{1 @@ -220,6 +223,16 @@ function s:GPGInit() let s:GPGCompress = substitute(output, ".*Compress: \\(.\\{-}\\)\n.*", "\\1", "") endfunction +" Function: s:GPGCleanup() {{{2 +" +" cleanup on leaving vim +" +function s:GPGCleanup() + " wipe out screen + new +only + redraw! +endfunction + " Function: s:GPGDecrypt() {{{2 " " decrypt the buffer and find all recipients of the encrypted file