Last active
July 25, 2026 16:36
-
-
Save c6401/710b49f85a7183bb7bdf4d927357dbbf to your computer and use it in GitHub Desktop.
test_vim_transparent_gpg.vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| augroup encrypted | |
| autocmd! | |
| autocmd BufReadPre,BufWritePre *.gpg,*.asc | |
| \ setlocal binary noswapfile noundofile nobackup nowritebackup | set viminfo= | |
| autocmd BufReadPost *.gpg,*.asc | |
| \ silent execute '%!gpg -qd 2>/dev/null' | setlocal nobinary | filetype detect | |
| autocmd BufWritePre *.gpg,*.asc | |
| \ silent execute '%!gpg -qc --cipher-algo AES256 2>/dev/null' | |
| autocmd BufWritePost *.gpg,*.asc | |
| \ silent undo | setlocal nobinary | |
| augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment