Yet another vim plugin for encrypting files with gpg
tomtom/tgpg_vim
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Features: - encrypt symmetrically - encrypt asymmetrically - clearsign buffer contents I couldn't get any of the existing gpg plugins to work properly (windows Gvim & cygwin gpg) and do all the things I wanted it to do, so I wrote this one. The main purpose is to perform symmetric encryption (the default) but it's flexible enough to do also clearsign and asymmetric encryption. You can set |g:tgpgMode| or |b:tgpgMode| to 'encrypt' for switching to asymmetric encryption as default. You can also control the use of symmetric and asymmetric encryption by setting set |g:tgpgPattern_symmetric| and |g:tgpgPattern_encrypt|. This plugin passes the passphrase on the command line to the gpg programm. So, it could be possible that somebody makes the passphrase show up in some command log. Under some circumstances it could also be possible that some info (eg the recipients) is logged in your viminfo file. If you clearsign a message, the plain text will be written to disk. Ie, if you clearsign a gpg encrypted message, the text will temporarily be written to disk as plain text -- please keep in mind the vast range of possible consequences. If you don't like to pass passphrases on the command line, you'd have to change the command templates. This plugin uses the (Buf|File)(Read|Write)Cmd autocommand events to write/read the file. I'm not sure how this works out with other plugins using these events. As I don't like typing passphrases, this plugin caches all the passphrases entered in encoded form in a script local variable. This means that passphrases could be written to core dumps/swapfiles, from where somebody somehow could possibly do something ... Set g:tgpgCachePW to 1 (buffer-wise caching only) or 0 (no caching) to change this. This plugin was tested with Windows GVim & cygwin gpg 1.4.5 (using bash as shell) as well as linux vim & gpg 1.4.5. It's possible (albeit unlikely) that the use of a pure Windows version of gpg or cmd.exe as shell doesn't work. (Please report problems.) If you get a message telling you about gpg command line options instead of the decrypted file, please check the value of |g:tgpgShellQuote|. If writing fails, it's possible that you end up with a corrupted or empty file. That's why we make backups by default. Set |g:tgpgBackup| to 0 to change this. ======================================================================= Install~ Edit the vba file and type: > :so % See :help vimball for details. If you have difficulties or use vim 7.0, please make sure, you have the current version of vimball (vimscript #1502) installed. Double-check the following variables for correct values: - |g:tgpg_gpg_cmd| - |g:tgpg_gpg_md5_sum| - |g:tgpg_gpg_md5_check| - |g:tgpgOptions| - |g:tgpgShellQuote| %s Status: Works for me (there may be some minor quirks) Install: See http://github.com/tomtom/vimtlib/blob/master/INSTALL.TXT See http://github.com/tomtom for related plugins.
About
Yet another vim plugin for encrypting files with gpg
Resources
Stars
Watchers
Forks
Packages 0
No packages published