helix icon indicating copy to clipboard operation
helix copied to clipboard

Keep arrow and special keys in insert

Open pickfire opened this issue 2 years ago • 15 comments

Advanced users won't need it and is useful for beginners. Revert part of #3671.

Beginners who do not read documentation rely on these keys, having these keys reduce the effort for them to get started, we are turning down 3 groups of people without it:

  • those that have no prior experience to modal editors
  • those that does not have time/effort to read docs or dig in issues to find out how to add the worse keys
  • those that even after they read docs they don't know how to change the config (well they need an editor to do it first, and helix is an editor, so this means we force them to read the docs on how to use helix better keys to edit helix config to add the worse keys if they don't use other editors?)

But if we have it, it does not affect advanced users, but it does have a chance to make those beginners lazy to learn, but I don't think we can do much about that.

Pros

  • lower barrier of entry, groups mentioned above can use helix without much guidance, steering helix towards being usable with zero-config even for beginners
  • users new to modal editors does not need to read docs to get started if they know a couple of basic vi keys: i, esc, :wq

Cons

  • user left with less motivation to learn the better keys and stick in their comfort zone
  • we may get some weird bugs which we don't cover for in insert keys due to less usage of arrow/special keys

Alternatives

We can let users use another editor if they don't want to learn or read docs, but I don't see much harm in doing so for the existing users.

I didn't keep emacs keys because most likely they already know the better keys and they can read docs if they use emacs, so it is fine not keeping it given that the keys are similar in terms of ergonomic.

The above is just my personal opinion, I am not sure about other team members. I personally don't use these keys in both insert and normal mode.

Poll was created in https://github.com/helix-editor/helix/discussions/3865 some people like it, some don't like it but I know it broke someones' workflow that people search the issues and wrote an essay about it

pickfire avatar Sep 20 '22 15:09 pickfire

You need to also revert the tutor change: https://github.com/helix-editor/helix/discussions/3865#discussioncomment-3666619

archseer avatar Sep 20 '22 16:09 archseer

I think it's too soon to be reverting this. My position isn't set in stone; I've heard these arguments, and there is validity to helping new users transition, but even so, at this point I still think this

  • user left with less motivation to learn the better keys and stick in their comfort zone
  • we may get some weird bugs which we don't cover for in insert keys due to less usage of arrow/special keys

Is presently still very much a thing. I don't believe all users who like to use the arrow keys are people who are too lazy to learn their editor, but I also don't believe in making decisions to cater to such a user base. This is a different editor, and some learning is required.

It could turn out that the goal of removing them will not be accomplished, and/or it will cause more harm than is worth it. If this turns out to be the case, I will not object to reverting. But at least initially, some push back from existing users was fully expected, but we won't know the overall effect on new users until probably the couple of weeks after the next release.

However, if other maintainers also feel it's better to add them back now, I won't object then either.

dead10ck avatar Sep 20 '22 16:09 dead10ck

overall effect on new users until probably the couple of weeks after the next release.

I think that's too late to decide, we should make the decision before the next release.

archseer avatar Sep 20 '22 16:09 archseer

overall effect on new users until probably the couple of weeks after the next release.

I think that's too late to decide, we should make the decision before the next release.

Okay. Then I'm honestly alright either way. I see both sides of it. If we revert, then maybe we can explore other ways to address the issue.

dead10ck avatar Sep 20 '22 16:09 dead10ck

I'm thinking we could match kakoune's insert mode: Only arrow keys and home/end, no ctrl or alt mappings: https://github.com/mawww/kakoune#33-insert-mode

archseer avatar Sep 20 '22 16:09 archseer

That sounds reasonable to me. Keep the basic bindings, but don't make the default overly cozy for staying in insert mode.

dead10ck avatar Sep 20 '22 17:09 dead10ck

Sounds good to me too :)

aral avatar Sep 20 '22 17:09 aral

For what it’s worth, I too think simply following the minimal kakoune insert mode is very reasonable. Neither too much, nor too little, and people looking for more than the basics will find the doc at some point.

CBenoit avatar Sep 20 '22 18:09 CBenoit

Is presently still very much a thing. I don't believe all users who like to use the arrow keys are people who are too lazy to learn their editor, but I also don't believe in making decisions to cater to such a user base. This is a different editor, and some learning is required.

What do you suggest for someone who starts learning helix as the first editor? How do you suggest them to open up helix as the first editor? Do we point them to use other editor to edit the config file and then come back to use helix?

Will work on the changes to add tutor and remove C- keys tonight. If anything I will try to get it done before the release.

pickfire avatar Sep 21 '22 00:09 pickfire

@pickfire

What do you suggest for someone who starts learning helix as the first editor? How do you suggest them to open up helix as the first editor? Do we point them to use other editor to edit the config file and then come back to use helix?

The very first thing the helix usage docs suggest is opening the tutor with hx --tutor, and the very first thing in the tutor explains hjkl. The rest is there for them to read. If they can't manage that, then I don't see any hope of them ever becoming productive with helix, arrow keys or not.

dead10ck avatar Sep 21 '22 02:09 dead10ck

Instead of removing the arrow keys only to add them again, wouldn't it make more sense to add this as an option? I suggest it would be enabled for new users (so either no value = enabled, or no value = disabled, but the default config file enables it). That way new users can still use the arrow keys if they so wish, but more advanced users can disable them if they are unneeded. Perhaps, even a warning comment could be added to the line enabling it in the default config, suggesting the users to turn the feature off to fully get into the helix workflow. Would there be any downsides to this approach?

NomisIV avatar Sep 21 '22 17:09 NomisIV

wouldn't it make more sense to add this as an option?

I think it's distasteful to add a config option for anything you can accomplish with keybindings.

the-mikedavis avatar Sep 21 '22 19:09 the-mikedavis

Ah, I wasn't aware it was possible to re-add the functionality by configuring the keybindings. In that case I also consider the configuration option redundant. Perhaps that option would make more sense would be if it disabled helix' modal editing completely, but that's probably outside the scope of this PR anyway.

NomisIV avatar Sep 21 '22 21:09 NomisIV

Instead of removing the arrow keys only to add them again, wouldn't it make more sense to add this as an option? I suggest it would be enabled for new users (so either no value = enabled, or no value = disabled, but the default config file enables it). That way new users can still use the arrow keys if they so wish, but more advanced users can disable them if they are unneeded. Perhaps, even a warning comment could be added to the line enabling it in the default config, suggesting the users to turn the feature off to fully get into the helix workflow. Would there be any downsides to this approach?

Existing users can always disable it by adding "noop" for those keys.

pickfire avatar Sep 22 '22 00:09 pickfire

You need to also revert the tutor change: https://github.com/helix-editor/helix/discussions/3865#discussioncomment-3666619

Regarding this, I think it is better for us to not revert the tutor change and keep it hidden. Since we are not recommending users to use it, users probably expected that it works and they can easily just try it out. Well, if they get into tutor means they want to learn the useful keys.

Note: If you want to move the cursor while in Insert mode, you may use the arrow keys instead of exiting and reentering Insert mode.

pickfire avatar Sep 22 '22 00:09 pickfire

I want to add that I think framing it as an advanced users vs. new users discussion misses that many folks who are very comfortable with modal movement sometimes use arrow keys in insert mode because it can be simply faster. On my keyboard I can reach the arrow keys easily with my pinky while on the home row, but I cannot reach the escape key without moving my left hand out of position. This means that the "activation energy" to change modes is somewhat high relative to just hitting an arrow key, so for one character movements it's a large speed gain to hit the arrow key. Granted, this greatly depends on the keyboard you have, how exactly you position your hands while typing, and even the size of your hands, but I think it's important to consider that there are legitimate reasons to want to move while in insert mode outside of the person who is simply new to the insert/normal mode split.

dylrich avatar Sep 23 '22 17:09 dylrich

@dylrich that's a good point, the assumption that "advanced users" would not want to use arrow keys is not correct, though I think the issue was mostly meant to address users who would use the arrow keys exclusively, which I think would tend to be someone not very experienced with modal editors.

dead10ck avatar Sep 23 '22 17:09 dead10ck

I mean, I don’t know if I qualify as an “advanced user” but I know I’ve been coding for 39 years (since I was 7) and I use the arrow keys ;)

Also, I feel old now :)

aral avatar Sep 23 '22 21:09 aral

I feel this kind of decision is really bad for the future of Helix, and honestly I am disappointed. I would rather see helix remove all default keybindings instead and maybe add an argument to load the "default bindings". By imposing these types of opinionated changes, you are clearly signaling that you don't helix to be used by anyone besides the people who already is used to the modal editing. Which is a very bad way to introducing the modal editing approach new users. Helix should be new user friendly to a point.

But who cares? I am not a core contributor.

pedronasser avatar Sep 25 '22 19:09 pedronasser

From the vision doc:

Don't try to be everything for everyone. There are many great editors out there to choose from. Let's make Helix one of those great options, with its own take on things.

archseer avatar Sep 25 '22 21:09 archseer

From the vision doc:

Don't try to be everything for everyone. There are many great editors out there to choose from. Let's make Helix one of those great options, with its own take on things.

There's a difference between having your own take on things, and not being perfect for everything and having the minimum requirement for a text editor for a new user. There's also a big difference between suggesting a better approach and basically requiring the user to learn by force the new approach. Yeah, a new user could configure it before starting to use it, but if you have any experience with software you know that new users often doesn't start by the config file. And if you want to make the user always configure before using then, like I said, just remove all default bindings and be clear about that in the doc and maybe also remove the "A post-modern modal text editor" part from it.

pedronasser avatar Sep 26 '22 04:09 pedronasser

@pedronasser

having the minimum requirement for a text editor for a new user

Big assumption on your part to presume that you know what new users need.

Yeah, a new user could configure it before starting to use it, but if you have any experience with software you know that new users often doesn't start by the config file

Or, you could spend the time to read the docs, and practice the editing style. The very first page of the Usage docs suggest reading through the tutor. I don't know about you or anyone else, but whenever I use a new tool, reading docs is the first thing I do. Yes, this requires more work up front. Maybe this comes down to individuals' learning styles, but I personally tend to front-load and do my learning first. I don't want to speak for anyone, but perhaps it's possible this conflict is coming from people who tend to like to learn by doing first, and only read when they get stuck.

But modal editing is different than modeless editing. It is sufficiently different that this will not work. You will not get by on previous experience, arrow keys or not.

dead10ck avatar Sep 26 '22 19:09 dead10ck