-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Word movement select from first range #1570
base: master
Are you sure you want to change the base?
Conversation
This should close #536. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
I think not exactly, this only fixes |
I think I would at least like @archseer to review this. |
I'm still undecided here. With this change |
I think this is better because when you think 3 words, then you press One use case, it's very easy to say you want to delete 3 full words, then For me, I think this builds on top of extends. At least I never had the need that |
Personally, I'd rather leave it as-is, where For example, there was a recent(ish) change that initially surprised me, but which after getting used to I'm quite happy about, where Having said all of that, I don't feel strongly about this, and I acknowledge that sometimes too strict adherence to consistency can harm practical usability. So I'm not specifically opposed, but just have a personal preference to leave as-is. |
I think if that's the case, we can keep it consistent as in |
I've changed my mind on this too, I think |
Is it due to consistency? Like Why is this? In my train of thought, in vim I can do |
Hmm. I see what you mean. So the difference is in how one interprets the count, i.e. does So I guess, what are the pros and cons to each? Right now one can do it either way: Personally, I almost never use counts, so I guess I really don't have a strong opinion one way or the other. Both ways of interpretation make sense to me. But it does seem like the current behavior is more consistent on the whole. |
The new approach can be more consistent once I change the rest, so consistency is not really an issue. Yes, it does lose the ability to select the 3rd word, but why would someone do that? If it is something very useful, wouldn't vim At the same time, even though this may not be a good approach, people can always do One benefit of the new approach over the current approach is that, |
Yeah, for sure, selecting the 3rd word is probably less often desired than selecting the next 3 words, and either way, one can still do |
I also don't feel strongly. (Truth be told, I almost never use the count feature anyway. The point at which the count becomes large enough for me to bother using it is also the point at which I would need manually count the words to know what number to enter, and at that point I might as well just hit |
I'm not sure how important user feedback is to help you decide on how to treat motions in normal mode, but as far as I've seen people are in 2 camps:
In my opinion first is more natural to users, and second to helix maintainers (user is not concerned with how program is made so I think it's more natural to think "select 3 words", and not "use 'w' three times"). I didn't see anyone arguing in favour of 3w selecting 3rd word as functionality (and i've never used that myself, most people in second camp want to keep it as is because of 'consistency', not because they find it useful - at least that's my understanding), so in my humble opinion it would be nice if whole motion would be selected. It would be more in line with what people coming from other editors would expect and would be useful much more often. |
There is a pretty good sign in this and related discussions that the current behavior is unintuitive. Almost everyone in these discussions gets the current behavior wrong. |
I just noticed there are some keys that did this correctly, such as |
I think makes much more sense if the counts, actually extend the selection since in most, if not all, cases the user is actually trying to do an action to multiple items rather than multiply the action. Would simply a lot the action on |
3w currently selects the 3rd word, this changes the behavior to select all 3 words rather than just the last.
3w currently selects the 3rd word, this changes the behavior to select
all 3 words rather than just the last.
One of the thing mentioned in #165.
Fix #536
Consistency check TODO
f
/t
/F
/T
]p
]f