Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to activate the plugin on demand ? #88

Open
FractalWire opened this issue Apr 10, 2018 · 3 comments
Open

Is it possible to activate the plugin on demand ? #88

FractalWire opened this issue Apr 10, 2018 · 3 comments
Milestone

Comments

@FractalWire
Copy link

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

@jamessan
Copy link
Owner

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.

@omarabid
Copy link

Or. Better. Just have a configuration where you can specify file types that you want to encrypt.

@ThomasAH
Copy link
Contributor

ThomasAH commented Jul 3, 2019

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 *.

@jamessan jamessan added this to the todo milestone May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants