svndiff.vim


Ⅰ. 插件描述

vim plugin to for visual display of svn diffs in two vim windows

Ⅱ. 基本信息

创建日期:  2007-06-20
使用用户:  4
Github星:  1
插件作者:  Eric Ji

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

1) used as vim command, format :D [v] [version #]
   :D h    
      -- diff between opened file and lastest svn version, horizontal split
   :D      
      -- diff between opened file and lastest svn version, vertical split
   :D h <version #>  example  :D 1.2
      -- diff between opened file and svn version #, horizontal split
   :D <version #>  example  :D v 1.2
      -- diff between opened file and svn version #, vertical split
2) map to key
   can create key mapping by adding the following lines in ~/.vimrc, example
   a. map <F8> <Plug>D
        -- press F8 in vim, show diff to svn last version, horizontal split
   b. map <F7> <Plug>Dh
        -- press F7 in vim, show diff to svn last version, vertical split
3) return from diff mode to normal mode
   :set nodiff

example:
  a) open a file in vim
  b) use vim command line, :D <enter> to see two windows with diffs
  c) :close to close tmp window
  d) :set nodiff to expand the compressed view, or press a on '+' sign to expand

version updates:
0.2 -- merged Tom Ziomek's fix

添加新评论