vim-gnupg icon indicating copy to clipboard operation
vim-gnupg copied to clipboard

Provide wrapper commands for decrypting and encrypting

Open blueyed opened this issue 8 years ago • 2 comments

When editing pillar files for Salt, these might contain encrypted information, e.g.

foo:
  api_key: |
    -----BEGIN PGP MESSAGE-----
    Version: GnuPG v1

    …
    -----END PGP MESSAGE-----

It is possible to decrypt them by visually selecting the block, removing the indentation and then running :!gpg --decrypt 2>/dev/null, but that could be simplified by providing a wrapper command for this.

What do you think?

In the same vain, gpg --encrypt --armor might be provided as a command, although that usually requires you to specify a recipient key, but which will be asked for interactively.

blueyed avatar Oct 08 '15 12:10 blueyed

Interesting idea. I'll give it some thought for a future release.

jamessan avatar Oct 08 '15 13:10 jamessan

#88 is somewhat related. If the commands proposed in that issue properly handle ranges, then that may solve your use case.

jamessan avatar Apr 25 '18 16:04 jamessan