How to create a command-line password locker (Linux.com)
Posted Mar 17, 2007 2:49 UTC (Sat) by
terminator (guest, #2292)
Parent article:
How to create a command-line password locker (Linux.com)
I use vim with the following config in ~/.vimrc
" Use GnuPG to open a .gpg file
augroup gpg
au!
au BufReadPre,FileReadPre *.gpg set viminfo=
au BufReadPre,FileReadPre *.gpg set noswapfile
au BufReadPost *.gpg :%!gpg -q -d
au BufReadPost *.gpg | redraw
au BufWritePre *.gpg :%!gpg --default-recipient-self -q -e -a
au BufWritePost *.gpg u
au VimLeave *.gpg :!clear
augroup END
Whenever I open a .gpg file, vim ask for my gpg key. It's pretty straightforward.
(
Log in to post comments)