Encrypt and Save a File with GPG and Vim
From within vim:
:w !gpg -c -o myfile.txt.gpg
Or add a command to your .vimrc
:
command -nargs=1 WriteEncrypted w !gpg -c -o <q-args>
So you can then simply type:
WriteEncrypted myfile.txt.gpg
Detailed explanation of parameters here:
http://jasonseney.com/post/18646147210/open-edit-save-encrypted-files-with-vim-and-gpg
Written by Jason Seney
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Security
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#