I am merging text (not code) using vim. Unfortunately, the paragraph formatting is different between the two text. I know if I used wdiff it would only show the differences that I am interested in, but to edit the text, I'd like to use diff-mode in vim. A quick search in the vim help and vim wiki gives me no hits. What would be a good way of achieving this?

| improve this question | | | | |

This morning I found an awesome Gist that does what you ask (w/o a wdiff dependency no less!). It could use a little polish in that you must specify the winnr() for each window you want to compare, but does basically what you want.

| improve this answer | | | | |

Without having wdiff I cannot give you an actual working example, but I suggest you read through ":help diff-diffexpr" and try modifying the example shown there to use wdiff.

However, if this works at all, you may still find yourself needing to do ":diffupdate" frequently.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.