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

Enhancement of x key-binding to be more flexible. #7023

Closed
dimus opened this issue May 11, 2023 · 1 comment
Closed

Enhancement of x key-binding to be more flexible. #7023

dimus opened this issue May 11, 2023 · 1 comment
Labels
C-enhancement Category: Improvements

Comments

@dimus
Copy link

dimus commented May 11, 2023

It is probably related to #1596; however, this approach is slightly different.

In Helix, v key-binding is quite flexible and allows for very nice control over selection by using the hjkl keys.

However, it does not allow selection on the level of lines.

The extend_line_below command is bound to x and does allow selecting one or more lines. However, it does not allow for shrinking the selection, so if too many lines are selected, we have to restart the entire selection process.

It would be nice if x behaved consistently with v and similar to Shift-v in Vim, allowing flexible line selections.

I do have a workaround currently by reassigning x to achieve an approximation of such behavior:

[keys.normal]
x = ["select_mode", "extend_to_line_bounds"]

This workaround selects a whole line and then allows for controlling the selection with the jk keys.

However, it is not 100% perfect and does increase the size of the configuration, while the selling point of Helix for me is its "working out of the box" approach.

What do you think? Does it make sense, or is a better approach in the works?

@dimus dimus added the C-enhancement Category: Improvements label May 11, 2023
@dimus dimus changed the title Enhancement of extend_line_below command to be more flexible. Enhancement of x key-binding to be more flexible. May 11, 2023
@the-mikedavis
Copy link
Member

See #2637: a linewise select mode is not planned. Also see #6943 which talks about the same use-case and a keymap you can make for it. IMO this is best solved with selection history as you say (#1596).

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

2 participants