mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user