aboutsummaryrefslogtreecommitdiff
path: root/dot_vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'dot_vimrc')
-rw-r--r--dot_vimrc9
1 files changed, 9 insertions, 0 deletions
diff --git a/dot_vimrc b/dot_vimrc
index 4e179a2..507b769 100644
--- a/dot_vimrc
+++ b/dot_vimrc
@@ -26,3 +26,12 @@ set pastetoggle=<F10>
au BufEnter ~/.local/state/neomutt/* set textwidth=72 | set list lcs=trail:-,nbsp:% | set filetype=mail
au BufEnter */gophermap set list lcs=trail:-,nbsp:%,tab:»·,space:·
+
+augroup encrypted
+ autocmd!
+ autocmd BufReadPre,FileReadPre *.gpg set viminfo=
+ autocmd BufReadPre,FileReadPre *.gpg set noswapfile noundofile nobackup
+ autocmd BufReadPost *.gpg :%!gpg --decrypt 2> /dev/null
+ autocmd BufWritePre *.gpg :%!gpg -ae --default-recipient-self
+ autocmd BufWritePost *.gpg u
+augroup END