Skip to content
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

Highlight just changed characters, not lines. #104

Open
ElectricRCAircraftGuy opened this issue Feb 24, 2021 · 0 comments
Open

Highlight just changed characters, not lines. #104

ElectricRCAircraftGuy opened this issue Feb 24, 2021 · 0 comments

Comments

@ElectricRCAircraftGuy
Copy link

ElectricRCAircraftGuy commented Feb 24, 2021

Please just highlight changed characters, not lines. This can be done by parsing the output of:

git diff --word-diff-regex=.

See here: https://stackoverflow.com/questions/3231759/how-can-i-visualize-per-character-differences-in-a-unified-diff-file/7870727#7870727

You may also need:

git diff --word-diff-regex='[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+'

This is how meld gets their char-by-char highlighting information I'm pretty sure, as I just did a cross-comparison and the output from either of those two commands above seems to match nearly perfectly.

If you add char-by-char highlighting, your tool would be much closer to meld and much more functional and useful.

In case someone else is able to add this support, please also drop in some notes here to orient us to your code so we would know where these parsing changes would need to be added.

Also, can you please explain your tool?:

  1. When is text colored, and what colors mean what?
    1. Where is this in your code?
  2. When is text highlighted, and what colors mean what?
    1. Where is this in your code?
  3. When is text underlined, and what means what?
    1. Where is this in your code?

I see some fantastic opportunities for beautification here. Again, I really think this could be made to look very similar to meld, which would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant