Re: Editing using alt-r does not distinguish case

Benno Schulenberg <[email protected]> Sun, 16 Jul 2023 17:31:47 +0200
Newsgroups gmane.editors.nano.general
Message-ID <[email protected]>
Op 16-07-2023 om 06:02 schreef Fergus Daly:
> I have a document with many instances of oldword (lc) and Oldword
> (uc). I want to change them all to newword and Newword respectively
> using the conventional Search and Replace. But trying the usual alt-r
> oldword to newword <All> replaces Oldword as well. And trying the
> usual alt-r Oldword to Newword <All> replaces oldword as well. I do
> not want to manage the changes one by one as there are 00s of them.
> Is there something I can change in Settings or .. ?

By default Search and also Replace are case _insensitive_.  You can
toggle case sensitivity on with M-C at the Search and Replace prompts.
(The help lines or ^G could have told you that.)

> I find that Search using ctrl-w also does not distinguish
> case; it would be good if a changed behaviour could be contrived here
> too. Any hints?

If you want Search and Replace to be case sensitive in all your
nano sessions, then put 'set casesensitive' in your ~/.nanorc.

Benno
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed