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

Search: Replace, match previous case #11853

Closed
PostImpatica opened this issue Sep 11, 2016 · 6 comments
Closed

Search: Replace, match previous case #11853

PostImpatica opened this issue Sep 11, 2016 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality search-replace Search and replace issues
Milestone

Comments

@PostImpatica
Copy link

While doing a search and replace: If I don't have match case selected, could the find and replace, replace the appropriate words based on their previous case?

example: I have several references to "HomeComponent", "HomeService", "homeService", "homeModel", "homeRef", etc.

If I want to change the word "Home" to "Portal", why can't I just add the word "portal" in the replace input and it automatically change all the above to:
"PortalComponent", "PortalService", "portalService", "portalModel", "portalRef", etc ???

Nobody should complain about this new functionality because you clearly don't care about case when you have "Match Case" unselected!

@bpasero bpasero added the feature-request Request for new features or functionality label Sep 13, 2016
@sandy081 sandy081 added the search Search widget and operation issues label Sep 13, 2016
@sandy081 sandy081 added this to the Backlog milestone Sep 13, 2016
@sandy081
Copy link
Member

sandy081 commented Sep 13, 2016

This is a good feature to have but I think this would change the existing behavior while replacing matchCase is disabled. Its true that when you do not select matchCase you do not care case while searching, but it won't be expected if you do not replace the word with what is provided. I would rather wait to see if we get more feedback for this request before we implement. Also, we have to consider what should be done with change in existing behavior if gets complained. May be an option to matchCase while replacing??

Thanks

@PostImpatica
Copy link
Author

@sandy081 Yeah, i realize this request is a bit of a long-shot, lol. Oh well, thx anyway!

@wolfgangmeyers
Copy link

@sandy081 I think that if matchCase option is off by default, there shouldn't be any change to the existing behavior.

@bmjsmith
Copy link

IntelliJ does this well. There's a separate switch called Preserve Case in the replace line. That would be ideal.

@sandy081 sandy081 added search-replace Search and replace issues and removed search Search widget and operation issues labels Dec 4, 2017
@BillDenton
Copy link

BillDenton commented Dec 19, 2017

Any updates on preserving case during replace?
There is an extension which does this: https://marketplace.visualstudio.com/items?itemName=vilicvane.sensitive-replace
It does work but would work much better if it was built into the normal search & replace.

@egamma egamma changed the title Find Replace, match previous case Search: Replace, match previous case Aug 2, 2019
@roblourens
Copy link
Member

#9798

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 2, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality search-replace Search and replace issues
Projects
None yet
Development

No branches or pull requests

7 participants