sponsor Vim development Vim logo Vim Book Ad

diff_navigator : Helps navigation in unified diffs

 script karma  Rating 4/5, Downloaded by 636  Comments, bugs, improvements  Vim wiki

created by
Petr Uzel
 
script type
ftplugin
 
description
*** IMPORTANT ***: the script is no longer maintained here. It has been taken over by Matěj Cepl and is now maintained at
https://gitlab.com/mcepl/vim-diff_navigator . Please get the script from there.

Simple script that helps navigation in unified diffs (patches).

Together with external utility filterdiff (part of patchutils) it provides DiffAnnotate command that tags all hunks with their number and name of the changed file.

DiffShowHunk command displays annotation of the current hunk (useful when inside a big hunk).

DiffNextFile and DiffPrevFile command can be used to quickly skip to next/previous changed file.

DiffNextHunk and DiffPrevHunk quickly skips to next/previous hunk.

DiffSplitHunk splits the hunk under the cursor, fixing previous hunk header.

DiffDeleteHunk deletes the hunk under the cursor and fixes all hunks to have correct headers.
 
install details
git clone  https://gitlab.com/mcepl/vim-diff_navigator.git (vim-pathogen [1] is recommended)

Also make sure that filterdiff (should be in patchutils package) program is installed somewhere in your $PATH.

[1] https://github.com/tpope/vim-pathogen
 

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
diff_navigator.vim 0.1 2008-08-28 7.0 Petr Uzel Initial upload
ip used for rating: 3.236.111.234

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