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

[FeatureRequest] Ignore sequence of character or entire lines matching regex (Text comparison and filenames) #106

Open
popbee opened this issue Sep 11, 2021 · 2 comments

Comments

@popbee
Copy link

popbee commented Sep 11, 2021

For more than a decade, Araxis Merge has been my top diffing application. One very neat feature is the ability to control the text diffing with custom regexes. Essentially have a way to "ignore" portions of lines that matches a regex pattern or ignore the whole line containing that pattern. (similar to your options for the ignore white space for example). They had a list of named regex patterns that you can enable/disable (so you can keep the list and use them when required).

If you are in control of the text diffing logic it might be relatively doable, hopefully your current "ignore white spaces" options already had to do the heavy lifting. I didn't check how your logic works (maybe you just rely on the built-in VSCode compare?).

I ran into a case just now with folder comparison. The file names all had a timestamp in it which I wanted to "ignore" so it would attempt to automatically compare those files as if they had the same name, for example:

config_dump_2021_09_11.json      config_dump_2021_09_10.json
settings_2021_09_11.json         settings_2021_09_10.json
@L13
Copy link
Owner

L13 commented Sep 12, 2021

Hi, the diffing logic is in my control, but I compare just buffers, not strings. So regex won't work. Otherwise if I change this logic the result wouldn't match the result of the VS Code Diff Editor. This would be confusing. So it is just a clone of this logic.

Adding a feature to ignore file names is possible, because this is independent of the VS Code Diff Editor. The extension is a spare time project and right now I have to push the development of the extensions to next year, because there is not time to do that. Maybe next year.

@popbee
Copy link
Author

popbee commented Sep 13, 2021 via email

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

2 participants