diffo


Ⅰ. 插件描述

Show unsaved differences (DiffOrig)

Ⅱ. 基本信息

创建日期:  2015-07-08
使用用户:  1
Github星:  3
插件作者:  Barry Arthur

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

== Diffo

DiffOrig

TIP: If you like diffo and want to share the W00t!, I'm grateful for
https://www.gittip.com/bairuidahu/[tips] or
http://of-vim-and-vigor.blogspot.com/[beverages].

=== Usage

Diffo extends the builtin +DiffOrig+ functionality by allowing you to
close the diff buffer from either window.

.User-configurable maps are provided to start and stop and update DiffOrig:

  • +<plug>diffo_open+ mapped to +<leader>do+ by default
  • +<plug>diffo_close+ mapped to +<leader>dc+ by default
  • +<plug>diffo_update+ mapped to +<leader>du+ by default

.To override these, provide maps like this in your |$MYVIMRC|:

nmap <leader>x <plug>diffo_open
nmap <leader>y <plug>diffo_close
nmap <leader>z <plug>diffo_update

The +:DiffOrig+ command is a toggle, opening a diff session in a normal
window and closing one in a DiffOrig window.

NOTE: For +:DiffOrig+ to close the DiffOrig window, your cursor needs to
be in that window first. You can identify it by its buffer name as
[Scratch].

添加新评论