.config/nvim/plugin/vimrc/autocmds.vim

Sat, 11 Mar 2023 01:04:58 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 11 Mar 2023 01:04:58 -0600
changeset 1076
15007f695dfb
parent 1075
3b88450bda15
permissions
-rw-r--r--

clean up unused vim fns

" https://mjj.io/2015/01/27/encrypting-files-with-gpg-and-vim/
" hacked to work with vimwiki
augroup encrypted
  autocmd!
  autocmd BufReadPre,FileReadPre *.gpg,*.gpg.* setl noswapfile noundofile nobackup viminfo=
  autocmd BufReadPost *.gpg,*.gpg.* call vimrc#SafeFilterFile('gpg2 -d')
  autocmd BufWritePre *.gpg,*.gpg.* call vimrc#SafeFilterFile('gpg2 -se -a --default-recipient-self')
  autocmd BufWritePost *.gpg,*.gpg.* :sil undo
augroup END

mercurial