vim-gnupg
vim-gnupg copied to clipboard
Is it possible to activate the plugin on demand ?
Hi,
So, if I have a file named 'myFile' that is encrypted but does not finish with .gpg, .pgp ar .asc, is it possible, once I start editing it to enable the plugin ? So that I can see the unencrypted version of the file and save my possible changes.
Thanks
The plugin currently requires that the filename matches a known pattern. It shouldn't be too difficult to add a :GPGDecrypt
command to decrypt an unrecognized buffer.
There would need to be some additional work to handle saving, since that also expects a certain filename pattern. This could possibly be simplified to check for a buffer-local variable that the buffer is the result of decrypting a file.
There should probably also be a :GPGEncrypt
command for the flip side of working with a new, unencrypted buffer and saving it as an encrypted file that doesn't match the expected filename pattern.
Or. Better. Just have a configuration where you can specify file types that you want to encrypt.
Or. Better. Just have a configuration where you can specify file types that you want to encrypt.
g:GPGFilePattern
already allows to configure this, so you could either configure it in your .vimrc, or a wrapper could temporarily set the pattern to *
.