On Aug 5, 5:22 am, Pankaj Deshpande <[email protected]>
wrote:
> Hello,
>    Is there a way to diff a certain portion of a buffer with another portion 
> of the same buffer?
>
>    Or more generally is it possible to specify buffer name and lines to diff 
> with another buffer name with its own (possibly) different set of lines like
>
> diff <buffer1; lines: b1_begin to b1_end> <buffer2; lines: b2_begin to 
> b2_end>?
>
> Then I could give buffer1 same as buffer2 but with different sets of lines.
>
> Basically, I have a c file and two portions of that code look similar. I want 
> to highlight the difference between these portions if there is any.
>

Short of copying each portion to two new buffers and diffing those,
no. Vim cannot diff only a portion of a buffer, nor can you manually
align portions of an existing diff.

The latter behavior is something KDiff3 supports, and probably other
external diff/merge tools as well.

Copying to two new buffers may not be as bad as it sounds, especially
if you open a new tab page for the diff.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to