In Emacs, by default, incremental search is case-insensitive. However, if you type any upper case characters as part of the search string, it becomes a case-sensitive search. So the question is, how do you easily perform a case-sensitive search of an all lower case pattern. The fewer the characters and easier to remember the better. I'm pretty sure this is built in, just can't recall how to do it.
Emacs' incremental search (that is, isearch-forward
) has a lot of modifiers to change the current search's behavior which you can type on the fly immediately after C-s
.
From isearch-forward
's documentation:
Type
M-c
to toggle search case-sensitivity.
Have (setq case-fold-search nil)
in your .emacs or M-x set-variable case-fold-search nil
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With