[SCM] vim-scripts packaging branch, master, updated. 94d6931b39bc216e79e1673187150bfec7383e86

James Vega jamessan at debian.org
Wed Sep 2 03:34:06 UTC 2009


The following commit has been merged in the master branch:
commit 94d6931b39bc216e79e1673187150bfec7383e86
Author: James Vega <jamessan at debian.org>
Date:   Tue Sep 1 23:33:14 2009 -0400

    Update gnupg to 2782

diff --git a/debian/changelog b/debian/changelog
index 1b3c2a5..70be887 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,7 +6,7 @@ vim-scripts (20090211-2) UNRELEASED; urgency=low
     (Closes: #539380)
   * addons upgrades:
     - supertab, DoxygenToolkit, NERD_commenter, Color Sampler Pack, xmledit,
-      VCSCommand, Align
+      VCSCommand, Align, gnupg
   * Add disabledby-doxygentoolkit.diff patch, which enables the commented out
     plugin loaded check.
   * Add xml-nodocs.diff patch, which disables xmledit's "automatic
diff --git a/debian/vim-scripts.status b/debian/vim-scripts.status
index a3f88b1..cb8d8dd 100644
--- a/debian/vim-scripts.status
+++ b/debian/vim-scripts.status
@@ -69,7 +69,7 @@ author_url:  http://www.vim.org/account/profile.php?user_id=1120
 email:       markus.braun at krawel.de
 license:     GNU GPL, see /usr/share/common-licenses/GPL
 disabledby:  let loaded_gnupg = 1
-version:     2276
+version:     2782
 
 script_name: plugin/taglist.vim
 addon:       taglist
diff --git a/html/index.html b/html/index.html
index 0c749c9..d6216ba 100644
--- a/html/index.html
+++ b/html/index.html
@@ -50,7 +50,7 @@
    <li><a href="syntax_mkd.vim.html">syntax/mkd.vim.html</a></li>
   </ul>
   <p>
-  Page generated on Tue, 01 Sep 2009 23:22:02 -0400
+  Page generated on Tue, 01 Sep 2009 23:24:57 -0400
 .
   </p>
  </body>
diff --git a/html/plugin_gnupg.vim.html b/html/plugin_gnupg.vim.html
index 8c4d86c..ad08241 100644
--- a/html/plugin_gnupg.vim.html
+++ b/html/plugin_gnupg.vim.html
@@ -46,6 +46,19 @@
     <tr>
         <td><small>not logged in (<a href="/login.php">login</a>)</small></td>
     </tr>
+    <tr><td>
+<small>&nbsp;</small>
+<form action="http://www.google.com/cse" id="cse-search-box">
+  <div>
+    <input type="hidden" name="cx" value="partner-pub-3005259998294962:bvyni59kjr1" />
+    <input type="hidden" name="ie" value="ISO-8859-1" />
+    <input type="text" name="q" size="20" />
+    <br>
+    <input type="submit" name="sa" value="Search" />
+  </div>
+</form>
+<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
+    </td></tr>
     <tr>
         <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="1"></td>
     </tr>
@@ -59,7 +72,7 @@
             <td class="sidebarheader"><a href="/index.php">Home</a></td>
         </tr>
         <tr>
-            <td class="sidebarheader"><a href="/search.php">Search</a></td>
+            <td class="sidebarheader"><a href="/search.php">Advanced search</a></td>
         </tr>
     <tr>
         <td><img src="/images/spacer.gif" alt="" border="0" width="1" height="7"></td>
@@ -153,8 +166,8 @@
 <tr>
   <td class="lightbg"><b>&nbsp;script karma&nbsp;</b></td>
   <td>
-    Rating <b>782/276</b>,
-    Downloaded by 5574  </td>
+    Rating <b>918/321</b>,
+    Downloaded by 7050  </td>
 </tr>
 </table>
 <p>
@@ -167,7 +180,7 @@
 <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 and swapfile to increase security.
<br>
<br>Commands:
<br>
<br>&nbsp;&nbsp;:GPGEditRecipients
<br>&nbsp;&nbsp;&nbsp;&nbsp;Opens a scratch buffer to change the list of recipients. Recipients that
<br>&nbsp;&nbsp;&nbsp;&nbsp;are unknown (not in your public key) are highlighted and have
<br>&nbsp;&nbsp;&nbsp;&nbsp;a prepended &quot;!&quot;. Closing the buffer makes the changes permanent.
<br>
<br>&nbsp;&nbsp;:GPGViewRecipients
<br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the list of recipients.
<br>
<br>&nbsp;&nbsp;:GPGEditOptions
<br>&nbsp;&nbsp;&nbsp;&nbsp;Opens a scratch buffer to change the options for encryption (symmetric,
<br>&nbsp;&nbsp;&nbsp;&nbsp;asymmetric, signing). Closing the buffer makes the changes permanent.
<br>&nbsp;&nbsp;&nbsp;&nbsp;WARNING: There is no check of the entered options, so you need to know
<br>&nbsp;&nbsp;&nbsp;&nbsp;what you are doing.
<br>
<br>&nbsp;&nbsp;:GPGViewOptions
<br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the list of options.
<br>
<br>Variables:
<br>
<br>&nbsp;&nbsp;g:GPGExecutable
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set used as gpg executable, otherwise the system chooses what is run
<br>&nbsp;&nbsp;&nbsp;&nbsp;when &quot;gpg&quot; is called. Defaults to &quot;gpg&quot;.
<br>
<br>&nbsp;&nbsp;g:GPGUseAgent
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 0 a possible available gpg-agent won't be used. Defaults to 1.
<br>
<br>&nbsp;&nbsp;g:GPGPreferSymmetric
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 1 symmetric encryption is preferred for new files. Defaults to 0.
<br>
<br>&nbsp;&nbsp;g:GPGPreferArmor
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 1 armored data is preferred for new files. Defaults to 0.
<br>
<br>&nbsp;&nbsp;g:GPGDefaultRecipients
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set, these recipients are used as defaults when no other recipient is
<br>&nbsp;&nbsp;&nbsp;&nbsp;defined. This variable is a Vim list. Default is unset.</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 and swapfile to increase security.
<br>
<br>Commands:
<br>
<br>&nbsp;&nbsp;:GPGEditRecipients
<br>&nbsp;&nbsp;&nbsp;&nbsp;Opens a scratch buffer to change the list of recipients. Recipients that
<br>&nbsp;&nbsp;&nbsp;&nbsp;are unknown (not in your public key) are highlighted and have
<br>&nbsp;&nbsp;&nbsp;&nbsp;a prepended &quot;!&quot;. Closing the buffer makes the changes permanent.
<br>
<br>&nbsp;&nbsp;:GPGViewRecipients
<br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the list of recipients.
<br>
<br>&nbsp;&nbsp;:GPGEditOptions
<br>&nbsp;&nbsp;&nbsp;&nbsp;Opens a scratch buffer to change the options for encryption (symmetric,
<br>&nbsp;&nbsp;&nbsp;&nbsp;asymmetric, signing). Closing the buffer makes the changes permanent.
<br>&nbsp;&nbsp;&nbsp;&nbsp;WARNING: There is no check of the entered options, so you need to know
<br>&nbsp;&nbsp;&nbsp;&nbsp;what you are doing.
<br>
<br>&nbsp;&nbsp;:GPGViewOptions
<br>&nbsp;&nbsp;&nbsp;&nbsp;Prints the list of options.
<br>
<br>Variables:
<br>
<br>&nbsp;&nbsp;g:GPGExecutable
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set used as gpg executable, otherwise the system chooses what is run
<br>&nbsp;&nbsp;&nbsp;&nbsp;when &quot;gpg&quot; is called. Defaults to &quot;gpg&quot;.
<br>
<br>&nbsp;&nbsp;g:GPGUseAgent
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 0 a possible available gpg-agent won't be used. Defaults to 1.
<br>
<br>&nbsp;&nbsp;g:GPGPreferSymmetric
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 1 symmetric encryption is preferred for new files. Defaults to 0.
<br>
<br>&nbsp;&nbsp;g:GPGPreferArmor
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 1 armored data is preferred for new files. Defaults to 0.
<br>
<br>&nbsp;&nbsp;g:GPGPreferSign
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set to 1 signed data is preferred for new files. Defaults to 0.
<br>
<br>&nbsp;&nbsp;g:GPGDefaultRecipients
<br>&nbsp;&nbsp;&nbsp;&nbsp;If set, these recipients are used as defaults when no other recipient is
<br>&nbsp;&nbsp;&nbsp;&nbsp;defined. This variable is a Vim list. Default is unset.
<br>
<br>Known Issues:
<br>
<br>&nbsp;&nbsp;In some cases gvim can't decryt files
<br>
<br>&nbsp;&nbsp;This is caused by the fact that a running gvim has no TTY and thus gpg is
<br>&nbsp;&nbsp;not able to ask for the passphrase by itself. This is a problem for Windows
<br>&nbsp;&nbsp;and Linux versions of gvim and could not be solved unless a &quot;terminal
<br>&nbsp;&nbsp;emulation&quot; is implemented for gvim. To circumvent this you have to use any
<br>&nbsp;&nbsp;combination of gpg-agent and a graphical pinentry program:
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;- gpg-agent only:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;you need to provide the passphrase for the needed key to gpg-agent
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in a terminal before you open files with gvim which require this key.
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;- pinentry only:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;you will get a popup window every time you open a file that needs to
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;be decrypted.
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;- gpgagent and pinentry:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;you will get a popup window the first time you open a file that
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;needs to be decrypted.
<br></td></tr>
 <tr><td>&nbsp;</td></tr>
 <tr><td class="prompt">install details</td></tr>
 <tr><td>Copy the gnupg.vim file to the $HOME/.vim/plugin directory. Refer to ':help add-plugin', ':help add-global-plugin' and ':help runtimepath' for more details about Vim plugins.
<br>
<br>From &quot;man 1 gpg-agent&quot;:
<br>...
<br>You should always add the following lines to your .bashrc or whatever initialization file is used for all shell invocations:
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp; GPG_TTY=‘tty‘
<br>&nbsp;&nbsp;&nbsp;&nbsp; export GPG_TTY
<br>
<br>It is important that this environment variable always reflects the output of the tty command. For W32 systems this option is not required.
<br>...</td></tr>
@@ -204,6 +217,22 @@ Click on the package to download.
     <th valign="top">release notes</th>
 </tr>
 <tr>
+        <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=10833">gnupg.vim</a></td>
+    <td class="rowodd" valign="top" nowrap><b>2782</b></td>
+    <td class="rowodd" valign="top" nowrap><i>2009-06-15</i></td>
+    <td class="rowodd" valign="top" nowrap>7.0</td>
+    <td class="rowodd" valign="top"><i><a href="/account/profile.php?user_id=1120">Markus Braun</a></i></td>
+    <td class="rowodd" valign="top" width="2000">- show more information (key id and creation time) of keys in GPGEditRecipients, GPGViewRecipients and during selecting in case of a ambiguous key.
<br></td>
+</tr>
+<tr>
+        <td class="roweven" valign="top" nowrap><a href="download_script.php?src_id=10683">gnupg.vim</a></td>
+    <td class="roweven" valign="top" nowrap><b>2773</b></td>
+    <td class="roweven" valign="top" nowrap><i>2009-05-27</i></td>
+    <td class="roweven" valign="top" nowrap>7.0</td>
+    <td class="roweven" valign="top"><i><a href="/account/profile.php?user_id=1120">Markus Braun</a></i></td>
+    <td class="roweven" valign="top" width="2000">- fix a bug in detecting windows platforms
<br>- added g:GPGPreferSign to sign encrypted files by default (thanks to Tim Swast).
<br></td>
+</tr>
+<tr>
         <td class="rowodd" valign="top" nowrap><a href="download_script.php?src_id=9142">gnupg.vim</a></td>
     <td class="rowodd" valign="top" nowrap><b>2276</b></td>
     <td class="rowodd" valign="top" nowrap><i>2008-08-18</i></td>
@@ -304,7 +333,7 @@ Click on the package to download.
           </td>
 
     <td align="right" valign="top">
-      		<a href="http://sourceforge.net" rel="nofollow"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
+      		<a href="http://sourceforge.net/projects/vim" rel="nofollow"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=8&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a>
     </td>
 
     <td><img src="/images/spacer.gif" width="5" height="1" alt=""></td>
diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim
index 39dbca2..fdcac93 100644
--- a/plugin/gnupg.vim
+++ b/plugin/gnupg.vim
@@ -1,5 +1,5 @@
 " Name: gnupg.vim
-" Version:  $Id: gnupg.vim 2276 2008-08-15 12:50:33Z mbr $
+" Version:  $Id: gnupg.vim 2782 2009-06-08 12:32:13Z mbr $
 " Author:   Markus Braun <markus.braun at krawel.de>
 " Summary:  Vim plugin for transparent editing of gpg encrypted files.
 " Licence:  This program is free software; you can redistribute it and/or
@@ -7,7 +7,7 @@
 "           See http://www.gnu.org/copyleft/gpl.txt
 " Section: Documentation {{{1
 " Description:
-"   
+"
 "   This script implements transparent editing of gpg encrypted files. The
 "   filename must have a ".gpg", ".pgp" or ".asc" suffix. When opening such
 "   a file the content is decrypted, when opening a new file the script will
@@ -15,7 +15,7 @@
 "   encrypted to all recipients before it is written. The script turns off
 "   viminfo and swapfile to increase security.
 "
-" Installation: 
+" Installation:
 "
 "   Copy the gnupg.vim file to the $HOME/.vim/plugin directory.
 "   Refer to ':help add-plugin', ':help add-global-plugin' and ':help
@@ -27,7 +27,7 @@
 "   You should always add the following lines to your .bashrc or whatever
 "   initialization file is used for all shell invocations:
 "
-"        GPG_TTY=‘tty‘
+"        GPG_TTY=`tty`
 "        export GPG_TTY
 "
 "   It is important that this environment variable always reflects the out‐
@@ -68,22 +68,49 @@
 "   g:GPGPreferArmor
 "     If set to 1 armored data is preferred for new files. Defaults to 0.
 "
+"   g:GPGPreferSign
+"     If set to 1 signed data is preferred for new files. Defaults to 0.
+"
 "   g:GPGDefaultRecipients
 "     If set, these recipients are used as defaults when no other recipient is
 "     defined. This variable is a Vim list. Default is unset.
 "
+" Known Issues:
+"
+"   In some cases gvim can't decryt files
+
+"   This is caused by the fact that a running gvim has no TTY and thus gpg is
+"   not able to ask for the passphrase by itself. This is a problem for Windows
+"   and Linux versions of gvim and could not be solved unless a "terminal
+"   emulation" is implemented for gvim. To circumvent this you have to use any
+"   combination of gpg-agent and a graphical pinentry program:
+"
+"     - gpg-agent only:
+"         you need to provide the passphrase for the needed key to gpg-agent
+"         in a terminal before you open files with gvim which require this key.
+"
+"     - pinentry only:
+"         you will get a popup window every time you open a file that needs to
+"         be decrypted.
+"
+"     - gpgagent and pinentry:
+"         you will get a popup window the first time you open a file that
+"         needs to be decrypted.
+"
 " Credits:
-" - Mathieu Clabaut for inspirations through his vimspell.vim script.
-" - Richard Bronosky for patch to enable ".pgp" suffix.
-" - Erik Remmelzwaal for patch to enable windows support and patient beta
-"   testing.
-" - Lars Becker for patch to make gpg2 working.
-" - Thomas Arendsen Hein for patch to convert encoding of gpg output
-" - Karl-Heinz Ruskowski for patch to fix unknown recipients and trust model
-"   and patient beta testing.
-" - Giel van Schijndel for patch to get GPG_TTY dynamically.
-" - Sebastian Luettich for patch to fix issue with symmetric encryption an set
-"   recipients.
+"
+"   - Mathieu Clabaut for inspirations through his vimspell.vim script.
+"   - Richard Bronosky for patch to enable ".pgp" suffix.
+"   - Erik Remmelzwaal for patch to enable windows support and patient beta
+"     testing.
+"   - Lars Becker for patch to make gpg2 working.
+"   - Thomas Arendsen Hein for patch to convert encoding of gpg output
+"   - Karl-Heinz Ruskowski for patch to fix unknown recipients and trust model
+"     and patient beta testing.
+"   - Giel van Schijndel for patch to get GPG_TTY dynamically.
+"   - Sebastian Luettich for patch to fix issue with symmetric encryption an set
+"     recipients.
+"   - Tim Swast for patch to generate signed files
 "
 " Section: Plugin header {{{1
 if (v:version < 700)
@@ -95,7 +122,7 @@ if (exists("g:loaded_gnupg") || &cp || exists("#BufReadPre#*.\(gpg\|asc\|pgp\)")
   finish
 endif
 
-let g:loaded_gnupg = "$Revision: 2276 $"
+let g:loaded_gnupg = "$Revision: 2782 $"
 
 " Section: Autocmd setup {{{1
 augroup GnuPG
@@ -119,6 +146,9 @@ augroup GnuPG
   autocmd VimLeave                               *.\(gpg\|asc\|pgp\) call s:GPGCleanup()
 augroup END
 
+" Section: Constants {{{1
+let s:GPGMagicString = "\t \t"
+
 " Section: Highlight setup {{{1
 highlight default link GPGWarning WarningMsg
 highlight default link GPGError ErrorMsg
@@ -132,7 +162,7 @@ highlight default link GPGHighlightUnknownRecipient ErrorMsg
 function s:GPGInit()
   " first make sure nothing is written to ~/.viminfo while editing
   " an encrypted file.
-  set viminfo= 
+  set viminfo=
 
   " we don't want a swap file, as it writes unencrypted data to disk
   set noswapfile
@@ -157,6 +187,11 @@ function s:GPGInit()
     let g:GPGPreferArmor = 0
   endif
 
+  " check if signed files are preferred
+  if (!exists("g:GPGPreferSign"))
+    let g:GPGPreferSign = 0
+  endif
+
   " check if debugging is turned on
   if (!exists("g:GPGDefaultRecipients"))
     let g:GPGDefaultRecipients = []
@@ -197,17 +232,17 @@ function s:GPGInit()
   " setup shell environment for unix and windows
   let s:shellredirsave = &shellredir
   let s:shellsave = &shell
-  if (match(&shell,"\\(cmd\\|command\\).execute") >= 0)
-    " windows specific settings
-    let s:shellredir = '>%s'
-    let s:shell = &shell
-    let s:stderrredirnull = '2>nul'
-  else
+  if (has("unix"))
     " unix specific settings
     let s:shellredir = &shellredir
     let s:shell = 'sh'
     let s:stderrredirnull = '2>/dev/null'
     let s:GPGCommand = "LANG=C LC_ALL=C " . s:GPGCommand
+  else
+    " windows specific settings
+    let s:shellredir = '>%s'
+    let s:shell = &shell
+    let s:stderrredirnull = '2>nul'
   endif
 
   " find the supported algorithms
@@ -390,6 +425,9 @@ function s:GPGEncrypt()
     if (exists("g:GPGPreferArmor") && g:GPGPreferArmor == 1)
       let b:GPGOptions += ["armor"]
     endif
+    if (exists("g:GPGPreferSign") && g:GPGPreferSign == 1)
+      let b:GPGOptions += ["sign"]
+    endif
     call s:GPGDebug(1, "no options set, so using default options: " . string(b:GPGOptions))
   endif
 
@@ -572,10 +610,11 @@ function s:GPGEditRecipients()
 
     " put some comments to the scratch buffer
     silent put ='GPG: ----------------------------------------------------------------------'
-    silent put ='GPG: Please edit the list of recipients, one recipient per line'
-    silent put ='GPG: Unknown recipients have a prepended \"!\"'
-    silent put ='GPG: Lines beginning with \"GPG:\" are removed automatically'
-    silent put ='GPG: Closing this buffer commits changes'
+    silent put ='GPG: Please edit the list of recipients, one recipient per line.'
+    silent put ='GPG: Unknown recipients have a prepended \"!\".'
+    silent put ='GPG: Lines beginning with \"GPG:\" are removed automatically.'
+    silent put ='GPG: Data after recipients between and including \"(\" and \")\" is ignored.'
+    silent put ='GPG: Closing this buffer commits changes.'
     silent put ='GPG: ----------------------------------------------------------------------'
 
     " get the recipients
@@ -614,6 +653,7 @@ function s:GPGEditRecipients()
       highlight link GPGUnknownRecipient  GPGHighlightUnknownRecipient
 
       syntax match GPGComment "^GPG:.*$"
+      exec 'syntax match GPGComment "' . s:GPGMagicString . '.*$"'
       highlight clear GPGComment
       highlight link GPGComment Comment
     endif
@@ -653,9 +693,13 @@ function s:GPGFinishRecipientsBuffer()
   let recipients = []
   let lines = getline(1,"$")
   for recipient in lines
+    " delete all text after magic string
+    let recipient = substitute(recipient, s:GPGMagicString . ".*$", "", "")
+
     " delete all spaces at beginning and end of the recipient
     " also delete a '!' at the beginning of the recipient
     let recipient = substitute(recipient, "^[[:space:]!]*\\(.\\{-}\\)[[:space:]]*$", "\\1", "")
+
     " delete comment lines
     let recipient = substitute(recipient, "^GPG:.*$", "", "")
 
@@ -773,11 +817,11 @@ function s:GPGEditOptions()
     silent put ='GPG: ----------------------------------------------------------------------'
     silent put ='GPG: THERE IS NO CHECK OF THE ENTERED OPTIONS!'
     silent put ='GPG: YOU NEED TO KNOW WHAT YOU ARE DOING!'
-    silent put ='GPG: IF IN DOUBT, QUICKLY EXIT USING :x OR :bd'
-    silent put ='GPG: Please edit the list of options, one option per line'
-    silent put ='GPG: Please refer to the gpg documentation for valid options'
-    silent put ='GPG: Lines beginning with \"GPG:\" are removed automatically'
-    silent put ='GPG: Closing this buffer commits changes'
+    silent put ='GPG: IF IN DOUBT, QUICKLY EXIT USING :x OR :bd.'
+    silent put ='GPG: Please edit the list of options, one option per line.'
+    silent put ='GPG: Please refer to the gpg documentation for valid options.'
+    silent put ='GPG: Lines beginning with \"GPG:\" are removed automatically.'
+    silent put ='GPG: Closing this buffer commits changes.'
     silent put ='GPG: ----------------------------------------------------------------------'
 
     " put the options in the scratch buffer
@@ -904,7 +948,6 @@ function s:GPGNameToID(name)
 
   " parse the output of gpg
   let pubseen = 0
-  let uidseen = 0
   let counter = 0
   let gpgids = []
   let choices = "The name \"" . a:name . "\" is ambiguous. Please select the correct key:\n"
@@ -913,15 +956,8 @@ function s:GPGNameToID(name)
     " search for the next uid
     if (pubseen == 1)
       if (fields[0] == "uid")
-        if (uidseen == 0)
-          let choices = choices . counter . ": " . fields[9] . "\n"
-          let counter = counter+1
-          let uidseen = 1
-        else
-          let choices = choices . "   " . fields[9] . "\n"
-        endif
+        let choices = choices . "   " . fields[9] . "\n"
       else
-        let uidseen = 0
         let pubseen = 0
       endif
     endif
@@ -929,7 +965,14 @@ function s:GPGNameToID(name)
     " search for the next pub
     if (pubseen == 0)
       if (fields[0] == "pub")
-        let gpgids += [fields[4]]
+        let identity = fields[4]
+        let gpgids += [identity]
+        if exists("*strftime")
+          let choices = choices . counter . ": ID: 0x" . identity . " created at " . strftime("%c", fields[5]) . "\n"
+        else
+          let choices = choices . counter . ": ID: 0x" . identity . "\n"
+        endif
+        let counter = counter+1
         let pubseen = 1
       endif
     endif
@@ -982,7 +1025,11 @@ function s:GPGIDToName(identity)
     else " search for the next uid
       if (fields[0] == "uid")
         let pubseen = 0
-        let uid = fields[9]
+        if exists("*strftime")
+          let uid = fields[9] . s:GPGMagicString . "(ID: 0x" . a:identity . " created at " . strftime("%c", fields[5]) . ")"
+        else
+          let uid = fields[9] . s:GPGMagicString . "(ID: 0x" . a:identity . ")"
+        endif
         break
       endif
     endif
@@ -1012,4 +1059,5 @@ if (has("menu"))
   amenu <silent> Plugin.GnuPG.View\ Options :GPGViewOptions<CR>
   amenu <silent> Plugin.GnuPG.Edit\ Options :GPGEditOptions<CR>
 endif
-" vim600: foldmethod=marker:foldlevel=0
+
+" vim600: set foldmethod=marker foldlevel=0 :

-- 
vim-scripts packaging



More information about the pkg-vim-maintainers mailing list