sponsor Vim development Vim logo Vim Book Ad

SCMDiff : Highlight changed lines in a file via SCM diff command

 script karma  Rating 60/27, Downloaded by 927    Comments, bugs, improvements  Vim wiki

created by
James Longstreet
 
script type
utility
 
description
This script is a modification of the script posted here:
http://tekrat.com/2008/02/21/vim-diff/

It allows you to quickly toggle (through a keybinding, Ctrl-D by default) the highlighting of changed lines in a file through an SCM's diff command.

It also binds Ctrl-G to :set nodiff to quickly turn off the highlighting.

The original script was written for git, but this version works for (at least) Mercurial and Subversion as well.  CVS and Perforce likely work but have not been tested.

It likely only works on Unix systems, or at least systems with 'cat' and 'patch', in addition to the SCM's command.

Configuration consists of the variable g:SCMDiffCommand, which if not set will be set to 'svn', assuming Subversion.  If g:SCMDiffCommand is set to 'hg', it works for Mercurial, and likewise 'git' for git.
 
install details
Just drop in $VIM/plugin and set g:SCMDiffCommand to the base command of the SCM system of your choice: i.e. 'svn', 'hg', 'git'.
 

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
scmdiff.vim 0.1 2008-03-25 7.0 James Longstreet Initial upload
ip used for rating: 54.225.1.70

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.
   
SourceForge.net Logo