-
Notifications
You must be signed in to change notification settings - Fork 153
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
Add Helix editing mode #642
Conversation
I know there have been quite a few people ask about helix mode, but this is quite ambitious. You might want to start with the founding principle of helix which is selection and just create a PR that allows one to do selection with keybindings. e.g. switch into selection mode, use left, right arrow keys to start and stop selection, switch out of selection mode, or something like that. Once we have a selection mode, it seems like this PR is possible, but not really until that. Just my opinion though. |
I think that is a good point actually. I'm barely a hop, skip and a jump into the implementation and it's already becoming quite clear that it makes very little sense to work on this without having some kind of selection mechanism in place. edit: sorry didn't read the comment carefully enough on the first pass. just noticed the mention of a selection mode |
Thank you for immediately giving this a shot and laying out a strategy to approach that. I really appreciate that. I want to be honest, why I have some concerns about landing this feature right now and why I think there should be a pretty high bar for an additional edit mode. While our "emacs"-like mode is pretty flexible and open for configuration the existing "vi"-mode is pretty hacky through reusing the same operations internally. In the context that we currently both have some severe deficit in end to end UI tests that can reliably catch complex regressions and are understaffed in terms of technical maintainers steeped in reedline I don't want to disappoint expectations/ambitions. |
So to make sure I've understood you correctly i'm going to try and summeraise your main points (feel free to point out any missunderstandings)
The conclusion you didn't mention explicity but I deduce from this is "we should not be doing this right now". Assuming I understood correctly some responses below, but tl;dr is: that's valid, I agree and if not now, then when? So firstly, you say "landing this feature right now" (no sarcasm intended) but this feature is not, nor do I expect it to be any time soon, anywhere near ready. I definitely agree that the bar for entry should be high. A crappy implementation would hurt both Nu and Helix (imo). So I did not expect to land this anytime soon, or without any discussion, I kinda just jumped in head first. As an extention of that, discussions like these are exactly why I opened a PR before doing any significant work, so I'm glad we're having this discussion. Secondly, as @fdncred mentioned and I recently found out, it really doesn't make sense to try and implement any of the helix bindings without having a mechanism for selections. This is something you mentioned could also benifit emacs and/or vi mode so working on that first would be good for everyone. Lastly, as to the fate of this PR. I think we all seem to be in agreement that it doesn't make sense to continue this at this moment, but I do have hope for a helix mode some day. I can leave it open as I do still think the approach is valid, even if it is currently blocked. I can see arguments both for leaving it open, or closing it and opening a new one when the time is right. I'm happy to defer to others on that front. Though I will also say, that if we're going to close this, I hope we can come to at least some agreed criteria for when it makes sense to open it back up, but stuff is hard so I fully accept the answer to that might be 🤷♀️ Thoughts? |
I think what I would gather as a reasonable point where it makes sense to go ahead with helix mode without impacting the effort to getting the rest of the modes nice would be:
|
Sounds like a good conclusion to me, and it seem like we're on the same page. Given that you didn't express a preference for either closing the PR or keeping it I think I'll be closing it to avoid having to do rebase work down the line. Once the time is there it makes more sense to revaluate if the approach even makes sense. Thanks for the good discussion! |
Thank you for being proactive here! |
Hi folks 👋
I'm opening up a draft PR even though it's not anywhere near done to get some early feedback as it's quite a big change. If this eventually lands it should fix #639 . Very open to feedback from others, but currenly my plan of action is broadly:
I'm putting the selection highlighting as optional even though it's actually quite a core component of the helix model (it's actually why the grammar got flipped, so you can see what you're making adjustments on) mostly because I have no idea how attanable it is, and small steps and all that.
Looking forward to you feedback!