File: gnupg.html

package info (click to toggle)
vim-scripts 20210124.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,384 kB
  • sloc: perl: 420; xml: 95; makefile: 25
file content (387 lines) | stat: -rw-r--r-- 18,736 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">

<head>
  <link rel="Stylesheet" type="text/css" href="/css/style.css" >
  <title>gnupg.vim - Plugin for transparent editing of gpg encrypted files. : vim online</title>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <meta name="KEYWORDS" content="Vim, Vi IMproved, text editor, home, documentation, tips, scripts, news">
  <meta name="viewport" content="width=1000, initial-scale=1">
  <link rel="shortcut icon" type="image/x-icon" href="/images/vim_shortcut.ico">
</head>

<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" bgcolor="#ffffff"> 

<!-- HEADER, SPONSOR IMAGE, VIM IMAGE AND BOOK AD -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
  <tr>
    <td colspan="4" class="lightbg"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
  </tr>
  <tr>
  <td class="lightbg">&nbsp;&nbsp;&nbsp;</td>
  <td class="lightbg" align="left"><a href="https://www.vim.org/sponsor/index.php"><img src="/images/sponsorvim.gif" alt="sponsor Vim development" border="0"></a></td>
  <td class="lightbg" align="center">
	 <a href="/"><img src="/images/vim_header.gif" border="0" alt="Vim logo" class="align-middle"></a>
	  </td>
  <td class="lightbg" align="right"><a href="http://iccf-holland.org/vim_books.html"><img src="/images/buyhelplearn.gif" alt="Vim Book Ad" border="0"></a></td>
  </tr>
  <tr>
    <td colspan="4" class="lightbg"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
  </tr>
  <tr>
    <td colspan="4" class="darkbg"><img src="/images/spacer.gif" width="1" height="10" alt=""></td>
  </tr>
</table>
<!-- THE PAGE BODY: BETWEEN HEADER AND FOOTER -->

<table cellpadding="0" cellspacing="0" border="0" width="100%">
  <col width="180">
  <col width="1">

  <tr valign="top">
    <td class="sidebar">
      <table width="180" cellpadding="4" cellspacing="0" border="0">
        <tr valign="top">
          <td class="sidebar">

<!-- INCLUDE THE PAGE NAVIGATION -->
<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
    <tr>
        <td><small>not logged in (<a href="https://www.vim.org/login.php">login</a>)</small></td>
    </tr>
    <tr><td>
<small>&nbsp;</small>
    </td></tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="1"></td>
    </tr>
    <tr>
        <td class="darkbg"><img src="/images/spacer.gif" alt='' border="0" height="3"></td>
    </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="2"></td>
    </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/">Home</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/search.php">Advanced search</a></td>
        </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
    </tr>
    <tr>
        <td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
    </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
    </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/about.php">About Vim</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/community.php">Community</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/news/news.php">News</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/sponsor/index.php">Sponsoring</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/trivia.php">Trivia</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/docs.php">Documentation</a></td>
        </tr>
        <tr>
            <td class="sidebarheader download"><a href="https://www.vim.org/download.php">Download</a></td>
        </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
    </tr>
    <tr>
        <td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
    </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
    </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/scripts/index.php">Scripts</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/tips/index.php">Tips</a></td>
        </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/account/index.php">My Account</a></td>
        </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
    </tr>
    <tr>
        <td class="checker"><img src="/images/spacer.gif" alt='' border="0" height="1"></td>
    </tr>
    <tr>
        <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
    </tr>
        <tr>
            <td class="sidebarheader"><a href="https://www.vim.org/huh.php">Site Help</a></td>
        </tr>
</table>
<br>

            <table width="172" cellpadding="0" cellspacing="0" border="0">
              <tr><td><img src="/images/spacer.gif" alt="" border="0" width="1" height="8"></td></tr>
              <tr><td class="darkbg"><img src="/images/spacer.gif" width="1" height="3" alt=""></td></tr>
            </table>
            <br>

<!-- INCLUDE THE PAGE SIDEBAR TEXT -->
&nbsp;

          </td>
        </tr>
      </table>
    </td>

    <td class="darkbg"><img src="/images/spacer.gif" width="1" height="1" border="0" alt=""><br></td>
    <td>
      <table width="100%" cellpadding="10" cellspacing="0" border="0" bordercolor="red">
        <tr>
          <td valign="top">

<span class="txth1">gnupg.vim : Plugin for transparent editing of gpg encrypted files.</span> 

<br>
<br>

<!-- karma table -->
<table cellpadding="4" cellspacing="0" border="1" bordercolor="#000066">
<tr>
  <td class="lightbg"><b>&nbsp;script karma&nbsp;</b></td>
  <td>
    Rating <b>1022/341</b>,
    Downloaded by 18070  </td>
  <td class="lightbg">
  <b>&nbsp;Comments, bugs, improvements&nbsp;</b>
  </td>
  <td>
    <a href="http://vim.wikia.com/wiki/Script:3645">Vim wiki</a>
  </td>  
</tr>
</table>
<p>

<table cellspacing="0" cellpadding="0" border="0">
<tr><td class="prompt">created by</td></tr>
<tr><td><a href="/account/profile.php?user_id=5603">James McCoy</a></td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td class="prompt">script type</td></tr>
<tr><td>utility</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td class="prompt">description</td></tr>
<tr><td>This script implements transparent editing of gpg encrypted files. The filename must have a &quot;.gpg&quot;, &quot;.pgp&quot; or &quot;.asc&quot; suffix. When opening such a file the content is decrypted, when opening a new file the script will ask for the recipients of the encrypted file. The file content will be encrypted to all recipients before it is written. The script turns off viminfo, swapfile, and undofile to increase security.
<br>
<br>This is a continuation of the work initially done by Markus Braun in <a href="/scripts/script.php?script_id=661">vimscript #661</a>.&nbsp;&nbsp;Development takes place at <a target="_blank" href="https://github.com/jamessan/vim-gnupg">https://github.com/jamessan/vim-gnupg</A>.</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td class="prompt">install details</td></tr>
<tr><td>Use your favorite plugin manager.
<br>
<br>For manual installation, use either pathogen (for older Vim versions) or Vim's packages.&nbsp;&nbsp;Unpack into either ~/.vim/bundle or ~/.vim/pack/gnupg/start/, respectively.
<br>
<br>From `man 1 gpg-agent`:
<br>
<br>&gt; You should always add the following lines to your `.bashrc` or whatever
<br>&gt; initialization file is used for all shell invocations:
<br>&gt;
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; GPG_TTY=`tty`
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp; export GPG_TTY
<br>&gt;
<br>&gt; It is important that this environment variable always reflects the output of
<br>&gt; the tty command. For W32 systems this option is not required.
<br>
<br>Most distributions provide software to ease handling of gpg and gpg-agent.
<br>Examples are keychain or seahorse.
<br>
<br>If there are specific actions that should take place when editing a
<br>GnuPG-managed buffer, an autocmd for the User event and GnuPG pattern can be
<br>defined. For example, the following will set `textwidth` to 72 for all
<br>GnuPG-encrypted buffers:
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;autocmd User GnuPG setl textwidth=72
<br>
<br>This will be triggered before any BufRead or BufNewFile autocmds, and therefore
<br>will not take precedence over settings specific to any filetype that may get
<br>set.</td></tr>
<tr><td>&nbsp;</td></tr>
</table>

<!-- rating table -->
<span class="txth2">script versions</span> (<a href="add_script_version.php?script_id=3645">upload new version</a>)
<p>
Click on the package to download.
<p>

<table cellspacing="2" cellpadding="4" border="0" width="100%">
<tr class='tableheader'>
        <th valign="top">package</th>
    <th valign="top">script version</th>
    <th valign="top">date</th>
    <th valign="top">Vim version</th>
    <th valign="top">user</th>
    <th valign="top">release notes</th>
</tr>
<tr>
        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=27359">vim-gnupg-v2.7.1.zip</a></td>
    <td class="rowodd" valign="top" nowrap><b>2.7.1</b></td>
    <td class="rowodd" valign="top" nowrap><i>2020-11-12</i></td>
    <td class="rowodd" valign="top" nowrap>7.2</td>
    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="rowodd" valign="top" width="2000">* Clear GPGOptions/GPGRecipients autocommands on BufUnload
<br>* Return early from Finish functions when buffer is not displayed</td>
</tr>
<tr>
        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=27357">vim-gnupg-v2.7.0.zip</a></td>
    <td class="roweven" valign="top" nowrap><b>2.7.0</b></td>
    <td class="roweven" valign="top" nowrap><i>2020-11-10</i></td>
    <td class="roweven" valign="top" nowrap>7.2</td>
    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="roweven" valign="top" width="2000">* Re-structure plugin so most of the implementation is under autoload/, with only required functionality in plugin/.&nbsp;&nbsp;Thanks to Lucas Hoffmann for the help.
<br>* Split the documentation into README (description, intro) and Vim help files (details relevant for usage).&nbsp;&nbsp;Thanks to Victor Koronen.
<br>* Honor 'verbose' to determine when to emit debug logs, as a gradual move away from g:GPGDebugLevel/g:GPGDebugLog
<br>* Do not use the '[/'] marks when saving the entire buffer to disk.&nbsp;&nbsp;This fixes an issue where plugins which reformat the buffer on save were causing only the reformatted portion of the buffer to be saved.</td>
</tr>
<tr>
        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=26175">gnupg.vim</a></td>
    <td class="rowodd" valign="top" nowrap><b>2.6.1</b></td>
    <td class="rowodd" valign="top" nowrap><i>2018-08-08</i></td>
    <td class="rowodd" valign="top" nowrap>7.2</td>
    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="rowodd" valign="top" width="2000">* Preserve &readonly setting even if the file itself isn't read-only (e.g., using &quot;vim -R&quot; or &quot;:view&quot;)
<br>* Let Vim detect file encoding and file format when opening the file
<br>* Remove unnecessary (and potentially damaging) changing of &encoding when reading/writing the encrypted file
<br>* Avoid adding extra blank lines to buffer when loading unencrypted files
<br>* Set &buftype='acwrite' to ensure encrypted buffers are only saved via the plugin's BufWriteCmd
<br>* Add support for Gpg4win so the plugin can be used under cygwin
<br>* Better mimic Vim's behavior when using &quot;:saveas&quot; or &quot;:w newfile&quot;, and leave the original buffer modified
<br>* Improve handling of options and recipients buffers to avoid one triggering the other
<br>* Check for the standard armor header, rather than inspecting gpg's output to determine if a file is armored</td>
</tr>
<tr>
        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=24199">gnupg.vim</a></td>
    <td class="roweven" valign="top" nowrap><b>2.6</b></td>
    <td class="roweven" valign="top" nowrap><i>2016-04-25</i></td>
    <td class="roweven" valign="top" nowrap>7.2</td>
    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="roweven" valign="top" width="2000">* Improved support for GPG 2.x
<br>* New g:GPGPossibleRecipients option to pre-populate the recipients list
<br>* New g:GPGFilePattern option to define which files will be handled by the plugin
<br>* Work around interactions between Vim and gpg/pinentry that caused special keys (e.g., arrows) to stop being recognized in Vim
<br>* Trigger FileWritePre/Post before/after saving a portion of a buffer
<br>* Trigger BufReadPre/FileReadPre before reading encrypted files
<br>* The buffer is now marked readonly if the source file does not have write permissions</td>
</tr>
<tr>
        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=18070">gnupg.vim</a></td>
    <td class="rowodd" valign="top" nowrap><b>2.5</b></td>
    <td class="rowodd" valign="top" nowrap><i>2012-06-01</i></td>
    <td class="rowodd" valign="top" nowrap>7.2</td>
    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="rowodd" valign="top" width="2000">* Ignore keys that aren't usable for encryption instead of simply ones that are expired</td>
</tr>
<tr>
        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=18068">gnupg.vim</a></td>
    <td class="roweven" valign="top" nowrap><b>2.4</b></td>
    <td class="roweven" valign="top" nowrap><i>2012-05-31</i></td>
    <td class="roweven" valign="top" nowrap>7.2</td>
    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="roweven" valign="top" width="2000">* Improvements when an encrypted file is being '&quot;:read&quot; into another buffer.
<br>** Don't wipeout the current buffer if decryption fails.
<br>** Use the current buffer's settings for 'swapfile' and 'undofile' instead of disabling them.
<br>* Make 'u' a no-op immediately after loading the file, just like with normal files.
<br>* Avoid prompting for disambiguation of keys once the user has selected which one to use.
<br>* Ignore expired keys when trying to find a matching key for an id entered in &quot;:GPGEditRecipients&quot;</td>
</tr>
<tr>
        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=16952">gnupg.vim</a></td>
    <td class="rowodd" valign="top" nowrap><b>2.3</b></td>
    <td class="rowodd" valign="top" nowrap><i>2011-11-23</i></td>
    <td class="rowodd" valign="top" nowrap>7.2</td>
    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="rowodd" valign="top" width="2000">* Resolve the filename when saving to follow symlinks.
<br>* Add support for specifying an alternate --homedir, using the g:GPGHomedir variable</td>
</tr>
<tr>
        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=16256">gnupg.vim</a></td>
    <td class="roweven" valign="top" nowrap><b>2.2</b></td>
    <td class="roweven" valign="top" nowrap><i>2011-08-13</i></td>
    <td class="roweven" valign="top" nowrap>7.0</td>
    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="roweven" valign="top" width="2000">Correctly handle the different keyid-format options</td>
</tr>
<tr>
        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=16225">gnupg.vim</a></td>
    <td class="rowodd" valign="top" nowrap><b>2.1</b></td>
    <td class="rowodd" valign="top" nowrap><i>2011-08-10</i></td>
    <td class="rowodd" valign="top" nowrap>7.2</td>
    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="rowodd" valign="top" width="2000">Add g:GPGUsePipes variable to avoid saving unencrypted data to tempfiles (in a private directory)</td>
</tr>
<tr>
        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=15987">gnupg.vim</a></td>
    <td class="roweven" valign="top" nowrap><b>2.0</b></td>
    <td class="roweven" valign="top" nowrap><i>2011-06-26</i></td>
    <td class="roweven" valign="top" nowrap>7.2</td>
    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=5603">James McCoy</a></i></td>
    <td class="roweven" valign="top" width="2000">Initial upload</td>
</tr>
</table>
<!-- finish off the framework -->
          </td>
        </tr>
      </table>
    </td>

  </tr>
</table>

<!-- END OF THE PAGE BODY: BETWEEN HEADER AND FOOTER -->

<table width="100%" cellpadding="0" cellspacing="0" border="0" bordercolor="red">
  <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr>
  <tr><td colspan="4" bgcolor="#000000"><img src="/images/spacer.gif" height="2" width="1" alt=""></td></tr>
  <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td></tr>
  <tr>
    <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>

    <td align="left" valign="top"><small>
      If you have questions or remarks about this site, visit the
      <a href="http://vimonline.sf.net">vimonline development</a> pages.
      Please use this site responsibly.
      <br> 
      
      Questions about <a href="http://www.vim.org/about.php">Vim</a> should go
      to the <a href="http://www.vim.org/maillist.php">maillist</a>.
      Help Bram <a href="http://iccf-holland.org/">help Uganda</a>.
      </small>
	&nbsp;
	&nbsp;

    </td>

    <td align="right" valign="top">
      	<a href="https://osdn.net/projects/vim" rel="nofollow">OSDN</a>
    </td>

    <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>
  </tr>

    
  <tr><td colspan="4"><img src="/images/spacer.gif" width="1" height="5" alt=""></td>
  
  </tr>
</table>

</body>
</html>