Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'santiclause/vim-ecfg'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'santiclause/vim-ecfg'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'santiclause/vim-ecfg'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/santiclause/vim-ecfg
Ⅳ. 文档说明
# vim-ecfg
Overview
This plugin is just hacky magic wrapping around ecfg to make it play nicely with
- I make no guarantees that it won't make things go horribly wrong.
Installation
Just stick it in your .vim/bundle folder.
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle
git clone https://github.com/santiclause/vim-ecfgRequirements
Use pathogen, unless you want to manually include it.
You gotta have +python in your vim, if you want to read decrypted files.
Otherwise, you just get barebones automatic encryption (the same as if you
didn't have the private key to decrypt a file).
Motivation
I originally had some simple vim magic that would decrypt ecfg files on read,
and encrypt them on write. Unfortunately, this re-encrypts every single value
(since I decrypted them on the way in), which makes it look like I touched
every value in git blame. Gross! Can't have that - but I still wanted to be
able to decrypt and encrypt automatically.
Implementation
Fundamentally, it's just diffing the decrypted values and then applying that
diff as a patch on the encrypted base file, and then re-encrypting after
applying the patch.