sponsor Vim development Vim logo Vim Book Ad

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

 script karma  Rating 23/10, Downloaded by 1023  Comments, bugs, improvements  Vim wiki

created by
Eric Ji
 
script type
utility
 
description
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
 
install details
copy this file to your vim plugin directory, normally ~/.vim/plugin
if not, can manally source this file in vim or add into ~/.vimrc
:source svndiff.vim
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
svndiff.vim 0.2 2008-07-30 6.0 Eric Ji Merged the patch from T Ziomek (t_ziomek@yahoo.com), to fix a bug when -v is used.
svndiff.vim 0.1 2007-06-20 6.0 Eric Ji Initial upload
ip used for rating: 3.144.202.167

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github