GnuPG Automatic Editing with VIM

  1. Clone this vim-gnupg plugin.
  2. Put the .vim file somewhere.
  3. Edit your .vimrc and tell it to source the file and…
  4. (optionally) Tell it what key to use as a default recipient:
let GPGDefaultRecipients="7F8BBB62DB0B51FA"
source ~/.vim/autoload/gnupg.vim

Ta-da. You can now “vim somefile.gpg” on the commandline and it will automagically decrypt and edit the file, then re-encrypt it when you save or save-exit.