6 ms·
text file + gpg + long passphrase You can also setup vim to read/write it easily augroup GPG au! " decrypt before reading au BufReadPre *.gpg
by bcl 16y ago
text file + gpg + long passphrase
You can also setup vim to read/write it easily
augroup GPG
au!
" decrypt before reading
au BufReadPre *.gpg set bin viminfo= noswapfile
" decrypted; prepare for editing
au BufReadPost *.gpg %!gpg
au BufReadPost *.gpg set nobin
" encrypt
au BufWritePre *.gpg set bin
au BufWritePre *.gpg %!gpg -ear email@wherever
" encrypted; prepare for continuing to edit the file
au BufWritePost *.gpg silent undo | set nobin
augroup END
- philips 16y agoI use something that is similar: http://ifup.org/git/?p=colosecure.git;a=blob;f=Makefile;h=147da6b276803b3a4c7ed1ba169dbc7b59dceede;hb=HEAD http://ifup.org/git/?p=colosecure.git;a=blob;f=Makefile;h=14...
- wonderzombie 16y agoThis sounds pretty great. I have much respect for DIY solutions. Is there any chance you or anyone else could point me to a howto or something similar?
- bcl 16y agoThis is so simple you don't need a howto. 1) Add the text block above to your ~/.vimrc file, change the email address to be one of your gpg keys. 2) Edit the file: vim somefile.gpg 3) Save the file
- quadhome 16y agoPresumably you never :wq and mis-type your password?
- bcl 16y agoYou don't need a password to encrypt, only decrypt. If you fudge your password during decryption you can just :q
- deleted 16y ago[deleted]
- arnoooooo 16y agoEven simpler, Vim now includes blowfish encryption.