sponsor Vim development Vim logo Vim Book Ad

diff_movement : Movement over diff hunks with ]] etc.

 script karma  Rating 5/2, Downloaded by 1376  Comments, bugs, improvements  Vim wiki

created by
Ingo Karkat
 
script type
ftplugin
 
description
DESCRIPTION
This filetype plugin provides movement commands and text objects for diff hunks.
Supports traditional, context and unified diff formats.

RELATED WORKS
- textobj-gitgutter (vimscript #4458) provides an inner-hunk text object for
  hunks provided by the vim-gitgutter plugin. It also requires textobj-user.

USAGE
                        Move around diff hunks:
]]                      Go to [count] next start of a diff hunk.
][                      Go to [count] next end of a diff hunk.
[[                      Go to [count] previous start of a diff hunk.
[]                      Go to [count] previous end of a diff hunk.

ih                      "inner hunk" text object, select [count] hunk contents.
ah                      "a hunk" text object, select [count] hunks, including
                        the header.
 
install details
INSTALLATION
This script is packaged as a vimball. If you have the "gunzip" decompressor
in your PATH, simply edit the *.vmb.gz package in Vim; otherwise, decompress
the archive first, e.g. using WinZip. Inside Vim, install by sourcing the
vimball or via the :UseVimball command.
    vim diff_movement*.vmb.gz
    :so %
To uninstall, use the :RmVimball command.

DEPENDENCIES
- Requires Vim 7.0 or higher.
- Requires the CountJump plugin (vimscript #3130).
 

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_movement-1.01.vmb.gz 1.01 2013-06-05 7.0 Ingo Karkat Avoid use of s:function() by using autoload function name. This fixes a regression in Vim 7.3.1032, reported by lilydjwg.
diff_movement.vba.gz 1.00 2010-08-03 7.0 Ingo Karkat Initial upload
ip used for rating: 142.132.191.50

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