vscode-diff icon indicating copy to clipboard operation
vscode-diff copied to clipboard

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

Open popbee opened this issue 4 years ago • 2 comments

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

popbee avatar Sep 11 '21 16:09 popbee

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.

L13 avatar Sep 12 '21 10:09 L13

Thanks for taking the time to answer despite being busy. Got it, you are bound to follow vscode compare's options. For the folder, I'll check if I can do something to help.

Le dim. 12 sept. 2021 06 h 23, L13|RARY @.***> a écrit :

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/L13/vscode-diff/issues/106#issuecomment-917607455, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIITNW2LK6JGS2J2U3IAE3UBR5SJANCNFSM5D3D4GAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

popbee avatar Sep 13 '21 13:09 popbee