Skip to content

vim-scripts/SCMDiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2201

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.

About

Highlight changed lines in a file via SCM diff command

Resources

Stars

Watchers

Forks

Packages

No packages published