-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Switch between search mode on the fly #111
Comments
Thanks for the suggestion. Personally, I exclusively use extended-search mode (
Introducing a key to switch modes will save a couple of keystrokes here, but the above method has worked pretty well for me. How about you try it for a while and tell me if you'd still want the switch feature? |
I second that request, I also find fuzzy search too broad sometimes. @junegunn Thanks for reminding about exact search using quote, I will give it a try. At the first glance I see weird behavior: I'm using zsh and I see different search results when 1) I press Is |
@balta2ar Yes, did you export the variable? |
@junegunn oops, my bad! Now it works, thank you! Personally I was thinking about toggling three search modes: exact, regexp and fuzzy. However this extended mode can cover pretty much of my use cases (if not all of them). This is probably for another issue but I miss |
@balta2ar Okay, I'll add those keys and let you know. Is |
I actually though about the quote functionality, but I wasn't sure whether it would be convenient enough if there is more than one search term. But I just had another idea: If you use the "exact" extended mode, the quote character serves no longer any purpose. So would it be possible to reverse its behaviour and make it use fuzzy searching for the "quoted" term? That way the quote essentially becomes a toggle dependent on the base mode. |
Fair enough. But for me navigating between terms hasn't been a problem thanks to
It's possible and I thought about it too. But currently in
leaving the mode as it is seems to better serve its original intention (and it's simpler). But I'm flexible on this. |
@balta2ar Updated! |
@junegunn Thank you! Yes, Two things I noticed, though. And second, which I don't really know how to make fully compliant, is what to consider a word separator. Say, if you have |
@balta2ar Oh yes, I'm aware of the difference but haven't really felt the need to fix it. Perfect readline compatibility would be nice of course, but for fzf, where you never stay more than a few seconds, current implementation suffices. But feel free to create an issue for it, I'll look into it when I get some time. |
Related: #173 |
I've decided not to do this. Mostly because I haven't felt the need for it so far and it requires non-trivial changes in code, such as cache invalidation, visual indication of the current mode, etc. Thanks. |
Both the normal fuzzy mode and the two extended modes are very useful for certain cases. However, it is not always clear which mode is the most fitting one for the current search. It would therefore be great if it were possible to switch between the different modes on the fly with a keybinding, and a visual indicator of which mode is currently active. Thanks!
The text was updated successfully, but these errors were encountered: