vimmercurialdiffpatch

Splitting a patch in two (ideally in Vim)


I have a patch which I'd like to split into two patches. I need to split the patch with per-line granularity -- I can't just split the hunks up into two separate files.

I could use Emacs diff mode, but I'm a Vim user, and I don't want to learn Emacs. I'm managing this patch in Mercurial Queues, and I've been using the crecord plugin, but it's pretty cumbersome for large patches, and the UI is really slow.

Ideally, I'd like to use Vim for editing my patch, but I haven't been able to find a suitable plugin. Otherwise, anything other than Emacs which is better than crecord would be helpful to me. Does such a thing exist?


Solution

  • Copying content from two comments into a Community Wiki answer.

    There seem to be two plausibly acceptable answers: