sponsor Vim development Vim logo Vim Book Ad

spotdiff.vim : A range and area selectable diffthis to compare partially

 script karma  Rating 28/12, Downloaded by 2987  Comments, bugs, improvements  Vim wiki

created by
Rick Howe
script type
Vim provides diff mode which is useful to see differences between windows. However, it always shows the differences for entire line. And can not compare a sequence of words within a line, and sentences and paragraphs which are separated into several lines.

To compare partially everywhere in windows, this plugin provides two groups of commands, which are alternative to vim original :diffthis, :diffoff, and :diffupdate. One is for which allows to select a range of lines to be compared in diff mode. Another is for which allows to select the Visual area to be compared in non-diff normal mode. Both work independently in a tab page.

For details and demo samples, please visit the following git repository: https://github.com/rickhowe/spotdiff.vim
install details
Install 'rickhowe/spotdiff.vim' by using your plugin manager. Or manually unzip and copy all folders in your ~/.vim or ~/vimfiles.

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
spotdiff4.1.zip 4.1 2021-06-08 8.0 Rick Howe Added keymaps to select the Visual area. Added a custom operator to select the motion and text object area. Added an option to highlight a corresponding diff unit. Added keymaps to jump cursor to the next/previous diff unit.
spotdiff4.0.zip 4.0 2021-04-17 8.0 Rick Howe Added a group of commands to select the Visual area to be compared in non-diff normal mode.
spotdiff3.2.zip 3.2 2019-08-29 8.0 Rick Howe Changed to use hl-CursorLine to indicate the selected lines.
spotdiff3.1.zip 3.1 2019-01-09 8.0 Rick Howe Disable a new internal diff (patch-8.1.360) to work correctly.
spotdiff2.2.zip 2.2 2017-12-03 7.4 Rick Howe Added :Diffupdate command.
spotdiff1.0.zip 1.0 2017-01-06 7.4 Rick Howe Initial upload
ip used for rating:

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.