Coder Social home page Coder Social logo

Event for accepting a menu item about reedline HOT 3 OPEN

chtenb avatar chtenb commented on June 9, 2024
Event for accepting a menu item

from reedline.

Comments (3)

sholderbach avatar sholderbach commented on June 9, 2024

Would Tab be the key you want to map it to? Would having accepting on Enter as well still be fine? (The until command system makes the state machine kind of messy for each of those) Or do you want to basically have the completions fill in the buffer while selecting, so that you can just continue typing?

from reedline.

chtenb avatar chtenb commented on June 9, 2024

Would Tab be the key you want to map it to?

Yes, that was my idea. Or more specifically, I want my tab key to accept the selected menu selection, or if no menu was active apply history completion. The latter already works.

Would having accepting on Enter as well still be fine?

I'm not sure. I guess it's fine, but for me the enter key is really about executing the command. So if I browsed some menu suggestions but decide I don't want any of them I'd like to be able to execute the command, in theory. I'm not sure how often this scenario happens in practice though, but that would be ideal I think.

Or do you want to basically have the completions fill in the buffer while selecting, so that you can just continue typing?

That also sounds decent to me, but I'm not sure if you could "unselect" the completion menu once you browsed through the completion options, in case you don't want any of the suggestions? Currently that doesn't seem possible with the completion menu. Another concern is that it doesn't quite match up with other tools I'm using, and not all tools provide the flexibility to behave like this.

I think in principle both behaviors are fine, but depending on what other tools someone is using they may have a preference for one or the other. So in general we may want to support both options?

from reedline.

sophiajt avatar sophiajt commented on June 9, 2024

I believe this is still valid.

from reedline.

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.