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

[Feature] bind command ensure-selection-start #10310

Open
patrick-kidger opened this issue Feb 19, 2024 · 3 comments
Open

[Feature] bind command ensure-selection-start #10310

patrick-kidger opened this issue Feb 19, 2024 · 3 comments

Comments

@patrick-kidger
Copy link

Right now the bind command has its own sublanguage. In particular this has a way to swap the start and end of the selection, with swap-selection-start-stop.

It'd be great if there was a way to specify that it was specifically at the start or the stop. The reason I'd find this useful is because I'm putting together a Helix-mode for editing commands, as an alternative to the existing vi-mode. I'm proposing adding an ensure-selection-start command that ensures the cursor is specifically on the left end of the selection.

Poking around a bit, it looks like this should be doable by adding an entry to this table:

const INPUT_FUNCTION_METADATA: &[InputFunctionMetadata] = &[

and a short implementation in this file:

//! Functions for reading data from stdin and passing to the parser. If stdin is a keyboard, it

Does this seem reasonable to you?

@cklim24
Copy link

cklim24 commented Feb 26, 2024

Right now the bind command has its own sublanguage. In particular this has a way to swap the start and end of the selection, with swap-selection-start-stop.

It'd be great if there was a way to specify that it was specifically at the start or the stop. The reason I'd find this useful is because I'm putting together a Helix-mode for editing commands, as an alternative to the existing vi-mode. I'm proposing adding an ensure-selection-start command that ensures the cursor is specifically on the left end of the selection.

Poking around a bit, it looks like this should be doable by adding an entry to this table:

const INPUT_FUNCTION_METADATA: &[InputFunctionMetadata] = &[

and a short implementation in this file:

//! Functions for reading data from stdin and passing to the parser. If stdin is a keyboard, it

Does this seem reasonable to you?

@faho
Copy link
Member

faho commented Feb 26, 2024

@cklim24: You've now just quoted two separate posts. Do you have anything to say?

@krobelus
Copy link
Member

yeah that sounds reasonable. Could probably also benefit https://github.com/sshilovsky/fish-helix

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

4 participants