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

Sat, 11 Mar 2023 20:58:42 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 11 Mar 2023 20:58:42 -0500
changeset 1077
5439ee582f9b
parent 1075
3b88450bda15
permissions
-rw-r--r--

Highlight the matched part in :ltag

1022
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 " https://mjj.io/2015/01/27/encrypting-files-with-gpg-and-vim/
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 " hacked to work with vimwiki
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 augroup encrypted
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 autocmd!
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 autocmd BufReadPre,FileReadPre *.gpg,*.gpg.* setl noswapfile noundofile nobackup viminfo=
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 autocmd BufReadPost *.gpg,*.gpg.* call vimrc#SafeFilterFile('gpg2 -d')
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 autocmd BufWritePre *.gpg,*.gpg.* call vimrc#SafeFilterFile('gpg2 -se -a --default-recipient-self')
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 autocmd BufWritePost *.gpg,*.gpg.* :sil undo
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 augroup END
d509e282ae10 More nvim config
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10

mercurial