added function to cleanup on leaving vim

For now create a new, empty buffer before leaving to wipe out data on console.
This commit is contained in:
Markus Braun
2008-08-15 09:53:06 +00:00
parent 9425fd6754
commit 6a0bdcf05c

View File

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