Giter Site home page Giter Site logo

Comments (4)

mhinz avatar mhinz commented on May 24, 2024

So more or less the same as #32. :)

The main problem is, that diff tools say nothing about columns, so it's kind of hard to highlight specific changes on a line.

from vim-signify.

unphased avatar unphased commented on May 24, 2024

Right you'll want to run a char-diff over the paired up lines (that we already know are the !-marked lines, and this could be a low-effort kind of thing (like the way vimdiff does it, which isn't a true diff). At any rate I'm super happy to find out that apparently something like this is in the works for 2.0!

from vim-signify.

mhinz avatar mhinz commented on May 24, 2024

You have to realize that Vim (or the plugin) doesn't know about any other files. It doesn't know the files it "diffs against", because it just processes text that some external tool generates. And that text doesn't say anything about where something on the lines has changed.

I yet have to come up with a method that doesn't have grave influence on the performance.

vimdiff knows both files that are getting diffed and can compare them much faster than any plugin, because it uses compiled code.

from vim-signify.

unphased avatar unphased commented on May 24, 2024

Yes so that external tool should at some stage both identify and diff the lines which are corresponding (which show up marked as !) so vim can parse out where to put indicators. I never said this would be very easy though.

One way, which is probably horrible for performance, is to just convert the pair of lines into a pair of files each with one character per line and run diff on that.

I do have a c++ character differ tool I built based on this which would be much speedier. Someday I have to tidy it up and post on github. Problem is, it doesn't have a line-based diff mode, it's a fully character based diff, with a fundamentally different form of output compared to the standard diff output (with @@ chunks, etc).

from vim-signify.

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.