sponsor Vim development Vim logo Vim Book Ad

diffwindow_movement : Movement over changes in a diff window.

 script karma  Rating 10/4, Downloaded by 1824  Comments, bugs, improvements  Vim wiki

created by
Ingo Karkat
 
script type
utility
 
description
DESCRIPTION
This plugin provides movement commands and text objects for windows in diff
mode.

USAGE
]C                      Go to [count] next end of a change.
[C                      Go to [count] previous end of a change.
                        These complement the built-in ]c [c commands.

ic                      "inner change" text object; in a diff window, select
                        [count] changes.
id                      "inner difference" text object; difference is more
                        fine-granular than diff changes; in a diff window,
                        select a range of lines that have the same
                        DiffAdd/DiffChange/DiffDelete highlighting.
 
install details
INSTALLATION
The code is hosted in a Git repo at
    https://github.com/inkarkat/vim-diffwindow_movement
You can use your favorite plugin manager, or "git clone" into a directory used
for Vim packages. Releases are on the "stable" branch, the latest unstable
development snapshot on "master".

This script is also 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 diffwindow_movement*.vmb.gz
    :so %
To uninstall, use the :RmVimball command.

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

CONFIGURATION
For a permanent configuration, put the following commands into your vimrc:

To change the default motion mapping, use:
    let g:diffwindow_movement_EndMapping = 'C'
To also change the [ / ] prefix to something else, follow the instructions for
CountJump-remap-motions.

To change the default text object mappings, use:
    let g:diffwindow_movement_ChangeTextObject = 'c'
    let g:diffwindow_movement_DifferenceTextObject = 'd'
To also change the i prefix to something else, follow the instructions for
CountJump-remap-text-objects.
 

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
diffwindow_movement-1.03.vmb.gz 1.03 2024-11-14 7.0 Ingo Karkat - CountJump 1.9 renames g:CountJump_Context to g:CountJump_TextObjectContext.  *** You need to update to CountJump.vim (vimscript #3130) version 1.90! ***
diffwindow_movement-1.02.vmb.gz 1.02 2014-07-22 7.0 Ingo Karkat - Allow to reconfigure the mappings for the motion and text objects. Thanks to Enno Nagel for suggesting this.
diffwindow_movement.vba.gz 1.01 2012-03-02 7.0 Ingo Karkat FIX: Vim 7.0/1 need preloading of functions referenced in Funcrefs.
diffwindow_movement.vba.gz 1.00 2011-08-31 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