Wiki: DebugInfo: VimGpg


Detailed view of a page, which is probably more useful for debugging than anything else.

Querying backend directly for 'VimGpg'

get_pagedata('VimGpg')
 _cached_html 
transformedtext Object
(
    [_type] => pagetype_wikitext Object
        (
        )

    [_basepage] => VimGpg
    [_content] => Array
        (
            [0] => <div class="wikitext"><p class="tightenable top">Here's an example of some .vimrc commands to add to enable editing of GPG encrypted files.</p>
<pre class="tightenable bottom">
&quot; Transparent editing of gpg encrypted files.
&quot; By Wouter Hanegraaff &lt;wouter@blub.net&gt;
augroup encrypted
    au!

    &quot; First make sure nothing is written to ~/.viminfo while editing
    &quot; an encrypted file.
    autocmd BufReadPre,FileReadPre      *.gpg set viminfo=
    &quot; We don't want a swap file, as it writes unencrypted data to disk
    autocmd BufReadPre,FileReadPre      *.gpg set noswapfile
    &quot; Switch to binary mode to read the encrypted file
    autocmd BufReadPre,FileReadPre      *.gpg set bin
    autocmd BufReadPre,FileReadPre      *.gpg let ch_save = &amp;ch|set ch=2
    autocmd BufReadPre,FileReadPre      *.gpg let shsave=&amp;sh
    autocmd BufReadPre,FileReadPre      *.gpg let &amp;sh='sh'
    autocmd BufReadPre,FileReadPre      *.gpg let ch_save = &amp;ch|set ch=2
    autocmd BufReadPost,FileReadPost    *.gpg '[,']!gpg --decrypt --default-recipient-self 2&gt; /dev/null
    autocmd BufReadPost,FileReadPost    *.gpg let &amp;sh=shsave

    &quot; Switch to normal mode for editing
    autocmd BufReadPost,FileReadPost    *.gpg set nobin
    autocmd BufReadPost,FileReadPost    *.gpg let &amp;ch = ch_save|unlet ch_save
    autocmd BufReadPost,FileReadPost    *.gpg execute &quot;:doautocmd BufReadPost &quot; . expand(&quot;%:r&quot;)

    &quot; Convert all text to encrypted text before writing
    autocmd BufWritePre,FileWritePre    *.gpg set bin
    autocmd BufWritePre,FileWritePre    *.gpg let shsave=&amp;sh
    autocmd BufWritePre,FileWritePre    *.gpg let &amp;sh='sh'
    autocmd BufWritePre,FileWritePre    *.gpg '[,']!gpg --encrypt --default-recipient-self 2&gt;/dev/null
    autocmd BufWritePre,FileWritePre    *.gpg let &amp;sh=shsave

    &quot; Undo the encryption so we are back in the normal text, directly
    &quot; after the file has been written.
    autocmd BufWritePost,FileWritePost  *.gpg   silent u
    autocmd BufWritePost,FileWritePost  *.gpg set nobin
augroup END
</pre>
</div>

        )

)
 hits  8771
get_versiondata('VimGpg',19)
 %content  Here's an example of some .vimrc command ...
 author  90.129.9.224
 author_id  90.129.9.224
 is_minor_edit   
 markup  2
 mtime  1187539352
 pagetype  wikitext
 summary  Kick some spam
get_versiondata('VimGpg',18)
 %content  Here's an example of some .vimrc command ...
 _supplanted  1187539352
 author  WikiWord
 author_id  WikiWord
 is_minor_edit   
 markup  2
 mtime  1186726338
 pagetype  wikitext
get_versiondata('VimGpg',17)
 %content  Here's an example of some .vimrc command ...
 _supplanted  1186726338
 author  WikiWord
 author_id  WikiWord
 is_minor_edit   
 markup  2
 mtime  1186724232
 pagetype  wikitext
get_versiondata('VimGpg',16)
 %content  Here's an example of some .vimrc command ...
 _supplanted  1186724232
 author  WikiWord
 author_id  WikiWord
 is_minor_edit   
 markup  2
 mtime  1184019004
 pagetype  wikitext
get_versiondata('VimGpg',14)
 %content  Here's an example of some .vimrc command ...
 _supplanted  1184019004
 author  87.248.161.196
 author_id  87.248.161.196
 is_minor_edit   
 markup  2
 mtime  1163041351
 pagetype  wikitext
 summary  dgfdgf
get_versiondata('VimGpg',13)
 %content  Here's an example of some .vimrc command ...
 _supplanted  1163041351
 author  71.156.104.53
 author_id  71.156.104.53
 is_minor_edit   
 markup  2
 mtime  1152754890
 pagetype  wikitext
 summary  Current script doesn't work when default shell is not sh

Copyright © 2007 RobertMelton.com