How do I make
%s/x/y/gc use case insensitive matching but do case sensitive replaces?
In emacs terms, I want
case-fold-search but not
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Looking at the code of
C-h f), the value for
case-replace is set to the value of
case-fold-search in the
So it looks like there is no configuration option provided for this by default. But of course you can just replace the
(not case-fold-search) after the
case-replace in that
let* and (re)evaluate the
evil-ex-substitute function definition.
NOTE how the value of
case-fold-search is set via
evil-ex-pattern-ignore-case. This a.o. means that you can use vim style patterns to set the value for
\c/\C as explained e.g. in this SE-answer).