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

When using a regex in "Search", add an option to "Replace all identicals" #609

Open
charliehoward4dp opened this issue Dec 27, 2024 · 3 comments
Labels
future feature New feature or request, but not core

Comments

@charliehoward4dp
Copy link

Enhancement suggestion:

When using a regex to find patterns, it would be a great timesaver in some situations to be able to tell GG to replace all "identical" matches to the string that just matched the current pattern. For example:

S: <i>(([^A-Z]|\n)+?)</i>
R1: <em>$1</em>
R2: <cite>$1</cite>
R3: <i lang="fr">$1</i>
R4: <i lang="la">$1</i>

The Search sometimes will find a phrase such as "en route" (French), and the appropriate Replace in this case would be R3. The phrase likely occurs frequently, so the user today can either replace each one as it occurs, or suspend the current S&R and create a new one just for <i>en route</i>. A "Replace all identicals" would find and replace all occurrences of <i>en route</i> with <i lang="fr">en route</i> and return the cursor to the position it held just before the "Replace all identicals" was executed. That would allow the user to continue the normal S&R, without having to individually Replace each "en route".

@windymilla
Copy link
Collaborator

That's a great idea, Charlie, and not one I've come across in other programs. There would definitely be some circumstances in PPing where it would save a bit of time. In order to avoid too much clutter, I'd like to hold off implementing it for a bit, so we can see how the various dialogs end up looking, whether we need to consider "Advanced/Expert" modes for some dialogs, etc., or some other way of making sure GG2 is not so busy and intimidating as some parts of GG1, but still providing the tools that novice and experienced PPers need. Thanks

@windymilla windymilla added the future feature New feature or request, but not core label Dec 27, 2024
@rtonsing
Copy link

Weird, this is exactly what I ran into yesterday, doing the same process. So I second the request.
No additional insight on the implementation, though.

@charliehoward4dp
Copy link
Author

This is not a feature I would expect to be implemented initially. I just wanted to get the description down while it was clear in my mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future feature New feature or request, but not core
Projects
None yet
Development

No branches or pull requests

3 participants