jamessan / vim-gnupg

This script implements transparent editing of gpg encrypted files.
http://www.vim.org/scripts/script.php?script_id=3645
728 stars 73 forks source link

Provide wrapper commands for decrypting and encrypting #46

Open blueyed opened 9 years ago

blueyed commented 9 years ago

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.

jamessan commented 9 years ago

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

jamessan commented 6 years ago

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