Only undo encryption of buffer content for encrypted files.
This commit is contained in:
parent
4771cc9025
commit
9a15ce7ef1
@ -86,7 +86,7 @@ autocmd BufWritePre,FileWritePre *.\(gpg\|asc\|pgp\) set bin
|
|||||||
autocmd BufWritePre,FileWritePre *.\(gpg\|asc\|pgp\) call s:GPGEncrypt()
|
autocmd BufWritePre,FileWritePre *.\(gpg\|asc\|pgp\) call s:GPGEncrypt()
|
||||||
" Undo the encryption so we are back in the normal text, directly
|
" Undo the encryption so we are back in the normal text, directly
|
||||||
" after the file has been written.
|
" after the file has been written.
|
||||||
autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) silent u
|
autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) if (exists("b:GPGEncrypted") && b:GPGEncrypted == 1) | silent u | endi
|
||||||
" Switch back to normal mode for editing
|
" Switch back to normal mode for editing
|
||||||
autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) set nobin
|
autocmd BufWritePost,FileWritePost *.\(gpg\|asc\|pgp\) set nobin
|
||||||
augroup END
|
augroup END
|
||||||
|
Loading…
x
Reference in New Issue
Block a user