Coder Social home page Coder Social logo

Comments (3)

AndrewRadev avatar AndrewRadev commented on May 27, 2024

It seems like a reasonable idea to me, and the interface you describe sounds sensible. There's a technical difficulty in that the two differ objects have a connection between them -- updating the lines in one of them needs to update the other, because it might have to shift a bit. I guess if there are multiple ones, there would need to be a list of them that need to be updated in order. I'm sure I have that already in my writable_search plugin, but the mechanics there are a bit different. I'll see what I can do.

from linediff.vim.

hcgraf avatar hcgraf commented on May 27, 2024

I had a quick look at the code and I think it would be quite possible.
You already have the differ objects in an object-oriented manner, so you could just have a list instead of two instances.

I think the order of updating the differ instances doesn't matter, as long as only one of them is saved at the same time. The same logic applies, if the changed differ is in the same file above, shift by the offset.
If multiple differ-buffers are saved at the same time, you just need to follow the order copy-to-original-buffer, update-other-differs, copy-to-original-buffer, update-other-buffers, …
Also the same as now.

I might have time in the next days / weeks to try and come up with a patch, but it's not sure yet.

from linediff.vim.

AndrewRadev avatar AndrewRadev commented on May 27, 2024

It would certainly be possible, I'm sure of that, the question is just how hard it would be to get it done, change the objects appropriately, clean up any unexpected bugs. I think it's a good idea to finally introduce some tests to this project as well, I'm getting annoyed of trying things out manually.

If you have the time and energy to propose a PR, it would certainly be appreciated. If not, I'll get around to it at some point myself. I'll probably start by writing some tests for the existing features, and only then the feature, so it might be some time until I have a working version.

from linediff.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.