Saturday, April 21, 2018

Re: Is this case fitting search/replace possible?

On Saturday 21 April 2018 19:04,
tuxic@posteo.de <tuxic@posteo.de> put forth the proposition:
>Hi,
>
>I want to search and replace in the following manner:
>
>Find the word. whjch should be replaced in a case insensitive manner.
>But:
>Replace the word by preserving the case.
>
>Example:
>Given world is "search" which shoyld be replaced by "replace"
>
>When finding replace it with
>"Search" "Replace"
>"SEARCH" "REPLACSE"
>"search" "replace"
>"SeArCh" "RePlAce"
>and so on...
>
>Is it possible without any further interaction?
>
>Thanks a lot in advance!
>Cheers!
>Meino

If I understand you correctly, this is already done by

:set ignorecase

The replace string will still be case sensitive, even though the
search string isn't.

-Dave

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: