Home Home > 2010 > 01 > 29 > Tip: transparent editing of gpg encrypted files with vim
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Tip: transparent editing of gpg encrypted files with vim

January 29th, 2010 by

If you are vim user and also use gpg to encrypt stuff, you might appreciate that you can teach vim to transparently open gpg encrypted files with vim gnupg plugin. Just install vim-plugin-gnupg from Contrib repository:

# zypper install vim-plugin-gnupg

Also, you should add following two lines to your .bashrc to make the plugin work properly:
export GPG_TTY

Then, if you tell vim to open gpg encrypted file, it will ask for passphrase, transparently decrypts it and after you make changes, it will encrypt the file again.

Both comments and pings are currently closed.

5 Responses to “Tip: transparent editing of gpg encrypted files with vim”

  1. Federico Lucifredi (F2)

    very nice one! Thanks!

  2. Choeger

    Ah, nice feature!
    I store all my passwords in single gpg encrypted files.

    But what/where is the Contrib repository?
    It’s not listed there:


    nor there:


  3. Wolfgang

    Hmm, I do that since years with a couple of lines in .vimrc. Why is there a plugin needed?

    • Petr Uzel

      For people who can’t/don’t want to implement it themseves? The plugin is nothing else than tested few lines of vimscript code after all.