Skip to content

dsh2/diff-fold.vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Pipe various Mercurial diff output to vim and see changesets, files, and
hunks folded nicely together.  In addition to providing folding of diff
text, diff_fold also provides a navigation pane which you can use to more
easily navigate large diffs.

Some examples:
    hg in --patch | vim -
    hg diff | vim -
    hg diff -r 12 -r 13 | vim -
    hg export -r 12: | vim -
    hg log --patch src\somefile.cpp | vim -

Navigation pane usage:
       
    The keybinding <Leader>nav will bring up the navigation pane.  You can
    use the 'Enter' or 'v' keys to either go to, or view whole changsets
    or files in the Diff View

    If you don't like the default mapping, you can map a new one as
    follows:
        map {newmap} <Plug>DiffFoldNav

Right now, this pretty much just works with Mercurial diff output.  Because Hg can use Git style patches, it does work with some Git output but it is not 100% reliable or useful.

Eventually, I hope to make this work with more version control systems and just about anything that can produce unified diff output.

This plugin has also been made into a pathogen bundle and can be installed with an 'hg clone https://bitbucket.org/thetoast/diff-fold' in your pathogen bundle folder.
In the future, the pathogen bundle may be more up-to-date, but any major updates will be made available here.

About

Folds changesets, files, and hunks in Mercurial diff output

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%