Add case-sensitive option to Search current file

Use case or problem

I’m looking for a specific word with casing, e.g. “AI” instead of “ai” or “Tails” (the character name) instead of “tails” (the common word plural).

Currently, searching “AI” will match “ai” inside the word “pair” and “Tails”. Searching “Tails” will find both “Tails” and “tails”, as well as other composites like “entails”.

Proposed solution

Add a checkbox “Match case” to the Search current file (Ctrl+F) toolbar, similarly to other text editing apps.

Note that Ctrl+Shift+F (Search in all files) already has this feature: in fact, you can either toggle the “Aa” match case button, or use the special syntax: match-case:[word]. We just need this for simple file search.

For short words like “AI”, the issue may also be solved by adding a “full word” or “word boundaries” option/syntax that makes sure you only match full words equal to “AI” and not containing the string “AI”. This would still match “ai” (rare, maybe love in Japanese), “Ai” (possible Japanese name) and “iA” (unlikely) but not “pair” and “Tails”. However, that would be another feature request.

Current workaround (optional)

I can use Ctrl+Shift+F to search all files and use either “Aa” match case button or match-case:[word]. However, I then need to pick the correct file in the list.

There may be a plugin that does this, but I’d rather keep using native search for such a simple operation.

Related feature requests (optional)

There is How to make Search Case Insensitive? which gives you the impression this was implemented, however the users are talking about Ctrl+Shift+F to Search in all files (by the way, the thread title should be renamed to reflect that; it’s disturbing for new users). The topic is closed so I cannot comment nor backlink to this issue.

2 Likes

You can extend your workaround by adding a file: search operator with the name of the note you want to search in. https://help.obsidian.md/Plugins/Search#Search+operators

2 Likes

+1 I use this frequently in applications that support it.

+1
Important when perusing long documents.

+1 This would be very nice to have.

+1 for this feature!