Search code examples
encryptionvimgnupg

How do I make Vim to ask for the password everytime I open a GPG encrypted file?


I am using the gnupg plugin with the variable g:GPGPreferSymmetric set.

I save and close the .gpg file with a password and when I reopen it, it is decrypted automatically without prompting me to enter the password. How do I ensure that the password is asked everytime I open the file?

My setup -

  • gVim ver 8.0
  • Windows 10
  • GPG4Win 3.0.3 (which consists of) -
    • GnuPG 2.2.4
    • Kleopatra 3.0.2
    • GPA 0.9.10
    • GpgOL 2.0.6
    • GpgEX 1.0.5

Solution

  • I was facing this problem because gpg-agent was active. Reopening the file after the 'cache-ttl' time period expired caused the prompt to enter the password to reappear.