Loading ...
Sorry, an error occurred while loading the content.

GPG and gvim - a symbiosis problem

Expand Messages
  • Ron Aaron
    Hi all - I have some rudimentary autocommands which allow me to edit gpg-encoded files. Currently, when I edit an .asc file, gpg is called to prefilter the
    Message 1 of 1 , Aug 24, 2004
    • 0 Attachment
      Hi all -

      I have some rudimentary autocommands which allow me to edit gpg-encoded files.
      Currently, when I edit an '.asc' file, gpg is called to prefilter the file
      and produce editable text.

      The problem I am having (specifically on Windows) is that the filter command
      to decrypt, "% !gpg -d" asks for the password. That console which is opened,
      opens *behind* my gvim window, which is confusing and inconvenient.

      I welcome any suggestions for how to make the command-shell come to the
      foreground, or how to have vim ask for the password and pass it to gpg (this
      is not at all easy, on purpose).

      My simple script follows:



      fun! GPGReadPost()
      % !gpg -d
      redraw
      endfun

      fun! GPGWritePre()
      %!gpg -q -e -a
      endfun

      fun GPGWritePost()
      endfun

      aug GPGASCII
      au!
      au BufReadPost *.asc :call GPGReadPost()
      au BufWritePre *.asc :call GPGWritePre()
      au BufWritePost *.asc u
      aug END


      --
      My GPG public key is at http://ronware.org/
      fingerprint: 8130 734C 69A3 6542 0853 CB42 3ECF 9259 AD29 415D
    Your message has been successfully submitted and would be delivered to recipients shortly.