To transparently work with files encrypted with gnupg, use jamessan’s vim-gnupg plugin. Once installed and active it will decrypt/ encrypt the file when reading and writing.

Additionally, creating a new file with extensions including “.gpg, “.pgp”, or “.asc” will prompt for the recipient and encrypt for said recipient.