GithubHelp home page GithubHelp logo

Incremental search about hunter HOT 5 CLOSED

rabite0 avatar rabite0 commented on August 19, 2024
Incremental search

from hunter.

Comments (5)

rabite0 avatar rabite0 commented on August 19, 2024 2

OK, it's in. It just updates the filter after every key press, otherwise it works just as before, so there's no regex/wildcard support or anything like that. Might add that later.

Searching is also incremental now.

from hunter.

rabite0 avatar rabite0 commented on August 19, 2024 1

By the way, it's now possible to select files using an external program like fzf. You can also select a directory which you wan to enter. You need fzf for this to work in the default configuration, but you can also use something else that shows a selection on stderr and prints the final files to select/directory to enter on stdout.

The key bindings are: Alt(space) to select files and Alt(/) to select a directory to enter.

It's not quite incremental search (and incremental filtering would be nice, too), but it might be useful to you.

from hunter.

rabite0 avatar rabite0 commented on August 19, 2024

You're right.

Currently, when the minibuffer opens it (exec, search, filter, etc) it actually completely takes over the event loop like the process and log viewer, so it would need a kludgy workaround, like when resizing. I need to build a VBox, so that it can be used like any other widget. Then I can make filtering incremental as well.

Or maybe I just kludge it for now. Definitely on the todo list!

from hunter.

alok avatar alok commented on August 19, 2024

Would https://github.com/lotabout/skim#use-as-a-library be helpful for this?

from hunter.

rabite0 avatar rabite0 commented on August 19, 2024

Only in so far as that you can use it as external searcher/selector.

The problem is that the prompt completely takes over the event loop at the moment, so there is no straightforward way to get input back to the rest of the program. It's essentially frozen until you hit enter. It also doesn't react to FS-events, etc. If that was fixed, or worked around, it would be as easy as updating the filter setting for the current folder with each letter one by one as they come, the rest is handled automatically.

I mean, it's not THAT hard, I just didn't get to it yet. Soon :).

from hunter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.