-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature brainstorm: highlight character position where edit occurred #75
Comments
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. |
Right you'll want to run a char-diff over the paired up lines (that we already know are the |
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. |
Yes so that external tool should at some stage both identify and diff the lines which are corresponding (which show up marked as 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 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 |
I'm somewhat certain that this is possible to do, because Syntastic does it.
In much the same way as the gutter does, but with only text background colors, mark out the positions in the lines where the edits had taken place. For instance, if I add a space into a line the line will become changed and marked with a
!
sign, but it would also be super nice if I could see where the edit happened: e.g., a red-background character in the edited line would indicate that the line had content removed from it there, and added characters would be shown in green. It would be nice to be able to attach a number to the red character as well, but that is likely to be difficult.The text was updated successfully, but these errors were encountered: