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
Suggestion: Multiple selections #89
Comments
i also need this so i'm gonna look at hs |
If you have
And with multiple selections you presumably do:
or, if the two files are the top two matches, you don't need to do the
This looks like the same number of keystrokes either way, but multiple selections requires more UI complexity and, if you're hitting |
so multiple selection is there? |
In Selecta? No, it can only select one line at a time. I'm asking whether there's actually a benefit to having it. |
No,
For what it's worth, since I filed this issue,
If you only have to type the common prefix once, how is it the same number of keystrokes? In a sense, this feature allows you to make a trade-off: you trade away typing at the cost of increased scanning. There are also special cases where you get the best of both worlds. For example, in Java development, it's common to have LengthyCamelCaseName.java and LengthyCamelCaseNameTest.java; to open them up side-by-side in vim, it's a snap to type
without having to read/navigate the screen à la nerdtree. Another special case is where I actually am exploring an unfamiliar project, not trying to open specific classes. If I've checked out the Apache client and I want to understand how it implements ALPN, one thing I can do is type
which allows me to quickly scan and choose from a stable set of choices. Multi-select is not the most critical feature in the world for a fuzzy-finder, but based on my experience using it over the last few years it is definitely worth the additional complexity. |
That makes sense, thanks. I'm not sure what I was thinking with that confused common prefix example. |
in fzf it's possible with tab and i used it to select several files in git add |
@rschmitt, what was your reasoning for ? Did you consider tab too? |
@garybernhardt In Heatseeker, |
Ahh, yeah, it does make sense to me that tab would cycle. Space would make conceptual sense. I never type space into Selecta because it's not useful unless your filenames actually have spaces, and even then the ranking algorithm will generally do fine without needing the space. I wonder if we could get away with using it Maybe it's too late to make that big a change, though. |
I've realized that for my two main coding use cases (
git add
and opening files in Vim), I almost always need to select more than one thing. For instance, I'll usually change prod code together with test code, and then want to add both to git:This quickly gets annoying, since I'll end up typing the exact same query twice for no good reason. If I want to
git add
(or open), say, five files (which is hardly uncommon), this gets tedious enough that I'll switch togit add -i
,git add -p
, or copy-and-paste using the mouse, because invoking hs repeatedly is just too cumbersome.I took the time to whip up a prototype of multi-select functionality in Heatseeker, and so far it really seems like it has legs. It looks like this:
Thanks to Rust stabilization, you can now install Heatseeker using Homebrew to play with this feature:
The controls are:
To support multiselect, the
SelectaCommand
script can be modified as follows (note that I'm using this with:tabe
rather than:e
):And the zshrc function
insert-selecta-path-in-command-line
only needs a one-line change:The text was updated successfully, but these errors were encountered: