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

Improve highlighting in diffs #34

Open
lyxell opened this issue Jun 17, 2021 · 2 comments
Open

Improve highlighting in diffs #34

lyxell opened this issue Jun 17, 2021 · 2 comments
Labels
cli enhancement New feature or request

Comments

@lyxell
Copy link
Owner

lyxell commented Jun 17, 2021

It would be nice with better diff highlighting, as seen in e.g. comby https://www.youtube.com/watch?v=JMZLBB_BFNg (03:20)

This could probably be achieved with tokenization and a check between upper and lower lines, no need to involve the AST.

@lyxell lyxell pinned this issue Jul 5, 2021
@lyxell lyxell unpinned this issue Jul 5, 2021
@lyxell lyxell added enhancement New feature or request cli labels Jul 5, 2021
@lyxell lyxell changed the title Highlighting based on AST diffs Improve highlighting diffs Jul 6, 2021
@lyxell lyxell changed the title Improve highlighting diffs Improve highlighting in diffs Jul 6, 2021
@lyxell
Copy link
Owner Author

lyxell commented Jul 6, 2021

Comby also has another nice feature when displaying diffs.

For a diff like:

-       int[] arr = {1, 2, 3, 4};
+       int[] arr;

It uses highlighting to instead display

! int[] arr = {1, 2, 3, 4};

where the bold part is red.

@lyxell
Copy link
Owner Author

lyxell commented Jul 6, 2021

After trying out a few different options, this is probably the way to go:

2021-07-06-212143_1232x672_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant