Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 24, 2026

Diff for vimconfig/vimrc between version 1.88 and 1.89

version 1.88, 2003/11/03 08:07:51 version 1.89, 2003/11/03 08:11:10
Line 19 
Line 19 
 " Send corrections to  " Send corrections to
 "        Lubomir Host 'rajo' <rajo AT platon.sk>  "        Lubomir Host 'rajo' <rajo AT platon.sk>
   
 " Version: $Platon: vimconfig/vimrc,v 1.87 2003/10/08 15:24:30 rajo Exp $  " Version: $Platon: vimconfig/vimrc,v 1.88 2003/11/03 08:07:51 rajo Exp $
   
 " Debian uses compressed helpfiles. We must inform vim that the main  " Debian uses compressed helpfiles. We must inform vim that the main
 " helpfiles is compressed. Other helpfiles are stated in the tags-file.  " helpfiles is compressed. Other helpfiles are stated in the tags-file.
Line 786  if has("autocmd")
Line 786  if has("autocmd")
         augroup END          augroup END
         " }}}          " }}}
   
           " Autocomands for GnuPG (gpg) {{{
           " Transparent editing of gpg encrypted files.
           " By Wouter Hanegraaff <wouter@blub.net>,
           " enhanced by Lubomir Host 'rajo' <rajo AT platon.sk>
           "
           augroup GnuPG
                   autocmd!
   
                   " First make sure nothing is written to ~/.viminfo while editing
                   " an encrypted file.
                   " viminfo doesn't have local value, set global value instead
                   autocmd BufReadPre,FileReadPre          *.gpg,*.asc set viminfo=
                   " We don't want a swap file, as it writes unencrypted data to disk
                   autocmd BufReadPre,FileReadPre          *.gpg,*.asc setlocal noswapfile
                   " Switch to binary mode to read the encrypted file
                   autocmd BufReadPre,FileReadPre          *.gpg,*.asc setlocal bin
                   autocmd BufReadPre,FileReadPre          *.gpg,*.asc let ch_save = &ch | setlocal ch=2
                   autocmd BufReadPost,FileReadPost        *.gpg,*.asc '[,']!gpg --decrypt -q -a 2>/dev/null
                   " Switch to normal mode for editing
                   autocmd BufReadPost,FileReadPost        *.gpg,*.asc setlocal nobin
                   autocmd BufReadPost,FileReadPost        *.gpg,*.asc let &ch = ch_save | unlet ch_save
                   autocmd BufReadPost,FileReadPost        *.gpg,*.asc execute ":doautocmd BufReadPost " . expand("%:r")
   
                   " Convert all text to encrypted text before writing
                   autocmd BufWritePre,FileWritePre        *.gpg,*.asc '[,']!gpg --encrypt --default-recipient-self -q -a
                   " Undo the encryption so we are back in the normal text, directly
                   " after the file has been written.
                   autocmd BufWritePost,FileWritePost      *.gpg,*.asc undo
           augroup END
           " }}}
   
 endif " if has("autocmd")  endif " if has("autocmd")
 " }}} Autocomands  " }}} Autocomands
   

Legend:
Removed from v.1.88  
changed lines
  Added in v.1.89

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top