Is it possible to do a search and replace in vim that preserves the case of the search term? This was a useful feature in intelliJ that I miss.
For instance, something like:
:s/[uU]ser/[pP]erson/ (obviously, this doesn't work)
Such that:
user->person
User->Person
Another example with multiple characters to preserve:
:s/[mM]y[uU]ser/[tT]his[pP]erson/g
Such that:
myuser->thisperson
myUser->thisPerson
MyUser->ThisPerson