Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exact matching mode without case sensitivity? #219

Closed
marty-oehme opened this issue Sep 4, 2019 · 8 comments
Closed

Exact matching mode without case sensitivity? #219

marty-oehme opened this issue Sep 4, 2019 · 8 comments

Comments

@marty-oehme
Copy link

It seems the fuzzy matching mode is always case insensitive, and the exact matching mode is always case sensitive.

However, is there any way to get the contiguous matching mode that exact provides (i.e. match whole words) while not having to also match the case? In other words, is it possible to set exact mode to case insensitivity, or smart-case?

For explanation: My use case is full-text searching my notes (with rg) and then searching over the output with skim. Matching the output with the fuzzy matcher mostly shows completely unrelated notes, and exact matching shows the perfect answers except for always having to search for the right case.

@Wonko7
Copy link

Wonko7 commented Oct 2, 2019

Same thing when skimming through book titles, I know the words, not the case.

@lotabout
Copy link
Collaborator

@marty-oehme The new fuzzy matching algorithm comes with smart case support as well as giving more bonus to consecutive matching. Would you please have a try to see if it suits your requirement?

As for case insensitive "exact mode", I think it may not be suitable to be the default behavior. I'll think more about that later.

@marty-oehme
Copy link
Author

@lotabout Thanks for the response! Unfortunately, due to this issue I had to switch my fuzzy matcher from skim and am generally a bit strapped for time right now.

As soon as I find the time to take the new algorithm for a sufficiently extensive test-run I will definitely let you know. Thanks again for taking the issue into consideration!

@Wonko7
Copy link

Wonko7 commented Jan 17, 2020

giving more bonus to consecutive matching

I tested 0.7.0: the results are fine with a small number of choices (switching vim buffers), but for digging through shell history if I don't use exact mode I never reach old entries. And if I use exact mode it only works if I'm sure of the case.
Could the adjacency bonus be adjustable? If it's high enough maybe exact mode won't need an insensitive version (I agree it shouldn't be the default behavior).

@muellerj
Copy link

I would 👍 an exact + case-insensitive option.

lotabout added a commit that referenced this issue Feb 23, 2020
Also support custom engine
@lotabout
Copy link
Collaborator

An option was added --case [respect,ignore,smart]. Apply --case ignore will do case insensitive matching in exact mode.

@marty-oehme
Copy link
Author

Thank you @lotabout, this is super useful!

@Wonko7
Copy link

Wonko7 commented Feb 25, 2020

Perfect! Thank you!

makovich pushed a commit to makovich/skim that referenced this issue May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants