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

Case matching replace or case sensitive history #12370

Open
rcwwilliams opened this issue Oct 21, 2022 · 7 comments
Open

Case matching replace or case sensitive history #12370

rcwwilliams opened this issue Oct 21, 2022 · 7 comments

Comments

@rcwwilliams
Copy link

Hi

Thank you so much for Notepad++ - I cannot express my gratitude enough.

I often need to replace words with both upper case and lower case initial letter - for example "fredBloggs" and "FredBloggs".

This involves 2 replace operations and a bit of faffing around getting the initial letter changed - plus the history seems to be case insensitive, so the previous item gets overwritten rather than having both "fredBloggs" and "FredBloggs" appearing in the history.

It would be great if you are able to add a case matching replace - or even - perhaps rather simpler - making the history case sensitive.

Thanks very much.

Kind regards

Robin

@alankilborn
Copy link
Contributor

Are you saying that in your replacement you need to keep the case of the first letter of the search match?

Example:

Replace fredBoggs with wadeBoggs and replace FredBoggs with WadeBoggs ?

or something else?

Maybe it is me but I can't follow your explanation. Probably I just need a bit more info to roll over into understanding it.

@rcwwilliams
Copy link
Author

rcwwilliams commented Oct 21, 2022

Thanks Alan

Yes - exactly as you have described so clearly - apologies if my earlier message was lacking clarity - been burning too many candles at both ends.

The case sensitive history would be great too so that FredBloggs and fredBloggs would be regarded as separate entries.

Thanks

@alankilborn
Copy link
Contributor

You won't like this :-) ...
but it can be done in a single step this way:

Find: ((f)|F)redBoggs
Replace: (?2w:W)adeBoggs
Search mode: Regular expression

@rcwwilliams
Copy link
Author

I know - but I am not a regexp wizzo and have to keep looking things up ...

What do you think of my request for case sensitive history?

@alankilborn
Copy link
Contributor

What do you think of my request for case sensitive history?

It seems OK to me but I have absolutely no decision-making power. :-)
I just try to help out, sorting issues, suggesting workarounds, etc.

Speaking of workarounds, if you're interested we could write a script to ease your situation. It would mean using a scripting plugin and getting it set up. Let me know if you're interested in that.

@rcwwilliams
Copy link
Author

Thanks Alan - having read your various comments, I think I'd like to let go of the idea of case matching replace but the case sensitive history would be really helpful

@alankilborn
Copy link
Contributor

Ok, then I'd suggest leaving this issue open and we'll see if the developers like the idea of making the history case sensitive.

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