Friday, June 29, 2018

Re: Perform diff as exact line match

On 2018-06-28 18:30, Joseph L. Casale wrote:
> Does a means or plugin exist to perform a diff between two
> tabs/files that compares entire lines?

I've occasionally hacked this by inserting a unique tag (usually just
an incrementing number) after each line in the file, something like

:windo g/^/put='Unique line: '.((line('.')/2)+1)

which gives fixed boundaries for the diff algorithm to sync up with
after every line.

It's a hack, and it's far from perfect, but it's helped in the couple
occasions I've wanted it.

-tim



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment