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

Add a new option or parameter to enable "--no-sort" #23

Closed
liangkarl opened this issue Jan 9, 2024 · 8 comments
Closed

Add a new option or parameter to enable "--no-sort" #23

liangkarl opened this issue Jan 9, 2024 · 8 comments

Comments

@liangkarl
Copy link

liangkarl commented Jan 9, 2024

Hi,

I've used this plugin for a period of time and I met a problem on the history search. In my case, I'd like to jump to the earliest keyword appeared. For example, when there are some compilation errors appeared, I'd like to jump to the earliest one. However, without --no-sort, fzf would mess up the result.

I've tried to modify $FZF_DEFAULT_OPT that does not work as there is no preserved position for appending --no-sort in the fuzzback.sh. I think this feature would be helpful if it could be added. Thanks.

Selection_010

@liangkarl liangkarl changed the title Add an option to enable "--no-sort" Add a new option or parameter to enable "--no-sort" Jan 9, 2024
@roosta
Copy link
Owner

roosta commented Jan 9, 2024

Ok, yeah, the no-sort was previously enabled by default, but due this issue, it was removed.

Would you like to have a keybinding to toggle it, or would you prefer an option and set it there permanently like you mentioned?

@liangkarl
Copy link
Author

liangkarl commented Jan 9, 2024

Thank you.
Yep, I saw the issue and realized that my suggesion is for another different usage.

If it's possible I'd suggest to keep both usages, instead of choosing one of them. The original configuration is limited to one keybinding making it hard to switch between these two kind of searching. So, I think maybe it's closed to "having a keybinding to toggle it" that you mentioned...?

Selection_012

@roosta
Copy link
Owner

roosta commented Jan 9, 2024

Does adding something like this

set -g @fuzzback-finder-bind 'ctrl-s:toggle-sort'
# or whichever shortcut you prefer

to your tmux config work? that way you can toggle it on and off. That's what I meant with a keybinding.

@liangkarl
Copy link
Author

liangkarl commented Jan 10, 2024

Does adding something like this

set -g @fuzzback-finder-bind 'ctrl-s:toggle-sort'
# or whichever shortcut you prefer

to your tmux config work? that way you can toggle it on and off. That's what I meant with a keybinding.

Yes, something like that.
Take your setting and my setting for example. Considering there are only two kinds of search methods (if we support this function,) if it could press the keys for different searches directly instead of pressing C-s then <leader>j, I think it would be better.

@roosta
Copy link
Owner

roosta commented Jan 10, 2024

I'd prefer using the option I showed an example of. Creating a new launcher script is a lot more work than simply toggling sorting on and off with an existing option.

@liangkarl
Copy link
Author

Got it. Thanks for your working~

@liangkarl

This comment was marked as resolved.

@liangkarl
Copy link
Author

liangkarl commented Jan 10, 2024

Sorry, I saw the code you mentioned. No problem now. Thanks!

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

2 participants