<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.nomorebluescreen.de/index.php?action=history&amp;feed=atom&amp;title=Gpg%2Fvimconfig</id>
	<title>Gpg/vimconfig - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.nomorebluescreen.de/index.php?action=history&amp;feed=atom&amp;title=Gpg%2Fvimconfig"/>
	<link rel="alternate" type="text/html" href="https://wiki.nomorebluescreen.de/index.php?title=Gpg/vimconfig&amp;action=history"/>
	<updated>2026-05-05T14:20:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.nomorebluescreen.de/index.php?title=Gpg/vimconfig&amp;diff=195&amp;oldid=prev</id>
		<title>Sunflower: Created page with &quot; &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 w...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.nomorebluescreen.de/index.php?title=Gpg/vimconfig&amp;diff=195&amp;oldid=prev"/>
		<updated>2019-03-07T20:12:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; &amp;quot; transparent editing of gpg encrypted files.  &amp;quot; By Wouter Hanegraaff &amp;lt;wouter@blub.net&amp;gt;  augroup encrypted      au!       &amp;quot; First make sure nothing is written to ~/.viminfo w...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; &amp;quot; transparent editing of gpg encrypted files.&lt;br /&gt;
 &amp;quot; By Wouter Hanegraaff &amp;lt;wouter@blub.net&amp;gt;&lt;br /&gt;
 augroup encrypted&lt;br /&gt;
     au!&lt;br /&gt;
 &lt;br /&gt;
    &amp;quot; First make sure nothing is written to ~/.viminfo while editing&lt;br /&gt;
    &amp;quot; an encrypted file.&lt;br /&gt;
    autocmd BufReadPre,FileReadPre      *.gpg set viminfo=&lt;br /&gt;
    &amp;quot; We don&amp;#039;t want a swap file, as it writes unencrypted data to disk&lt;br /&gt;
    autocmd BufReadPre,FileReadPre      *.gpg set noswapfile&lt;br /&gt;
    &amp;quot; Switch to binary mode to read the encrypted file&lt;br /&gt;
    autocmd BufReadPre,FileReadPre      *.gpg set bin&lt;br /&gt;
    autocmd BufReadPre,FileReadPre      *.gpg let ch_save = &amp;amp;ch|set ch=2&lt;br /&gt;
    autocmd BufReadPost,FileReadPost    *.gpg &amp;#039;[,&amp;#039;]!gpg --decrypt 2&amp;gt; /dev/null&lt;br /&gt;
    &amp;quot; Switch to normal mode for editing&lt;br /&gt;
    autocmd BufReadPost,FileReadPost    *.gpg set nobin&lt;br /&gt;
    autocmd BufReadPost,FileReadPost    *.gpg let &amp;amp;ch = ch_save|unlet ch_save&lt;br /&gt;
    autocmd BufReadPost,FileReadPost    *.gpg execute &amp;quot;:doautocmd BufReadPost &amp;quot; . expand(&amp;quot;%:r&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
    &amp;quot; Convert all text to encrypted text before writing&lt;br /&gt;
    autocmd BufWritePre,FileWritePre    *.gpg   &amp;#039;[,&amp;#039;]!gpg -ae 2&amp;gt;/dev/null&lt;br /&gt;
    &amp;quot; Undo the encryption so we are back in the normal text, directly&lt;br /&gt;
    &amp;quot; after the file has been written.&lt;br /&gt;
    autocmd BufWritePost,FileWritePost    *.gpg   u&lt;br /&gt;
 augroup END&lt;/div&gt;</summary>
		<author><name>Sunflower</name></author>
	</entry>
</feed>