tGpg


Ⅰ. 插件描述

Yet another vim plugin for encrypting files with gpg

Ⅱ. 基本信息

创建日期:  2007-01-02
使用用户:  2
Github星:  2
插件作者:  Tom Link

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'tomtom/tgpg'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'tomtom/tgpg'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'tomtom/tgpg'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/tomtom/tgpg_vim

Ⅳ. 文档说明

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

  1. So, it could be possible that somebody makes the passphrase
  2. up in some command log. Under some circumstances it could also be

possible that some info (eg the recipients) is logged in your viminfo

  1. If you clearsign a message, the plain text will be written to
  2. Ie, if you clearsign a gpg encrypted message, the text will
  3. 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.

添加新评论