place count after motion and show jump point indicators #15157
Replies: 1 comment 2 replies
-
I think it would be confusing especially for newcomers. The layout of the text changes, which confuses them. Lines would be broken up (softwrap), which confuses them even more! And how far should the inlay numbers be displayed? Just the current line? That confuses me, because currently Btw, in my years of using vim and now helix, I NEVER used count. For your example (deleting the first 4 words) I would use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Something that's always struck me as odd is how despite reversing the
action -> motionparadigm of nvim (e.g. ed rather than de) so that you can see what an action will motify before committing to it, helix does not reverse thecount -> motionparadigm.While it may not initially seem like this can provide the same ability to foresee the outcome of your motions, I think a small tweak would allow it to. Specifically, if it rendered some dimmed text next to the location a motion will move the cursor to.
This probably sounds pretty confusing, so I'll provide an example. Let's imagine we have the following passage:
The quick red fox jumps over the lazy brown dog
Now, let's assume we wish to delete the first 4 words, with the cursor starting at the start of the text.
In nvim, we would need to predict the entire action, entering
d4eafter which it would appear as follows:jumps over the lazy brown dog
In helix, we can do it somewhat more intuitively, first entering
4e, selecting the first 4 wordsThe quick red fox jumps over the lazy brown dog
Then pressing
dto delete it.jumps over the lazy brown dog
The same key count, but we were able to confirm whether our deletion would effect the appropriate text.
If we were to reverse the motion/count order, or allow the use of the count following the motion, this would function as follows:
First you press
e, jumping to the end of and selecting the first word, but also showing some dimmed numbers beside each following wordThe quick
ered2fox3jumps4over5the6lazy7brown8dog9(Imagine those are in a dimmer colour)
Then you press 3, highlighting till the end of fox
The quick red fox jumps
eover2the3lazy4brown5dog6Then press d to delete. 0 guess work.
I reckon the idea of numbers sitting next to jump points could be really helpful for newcomers, but it'd need to be togglable or at least only visible after notions where it won't cause a headache. I suspect existing helix users would also want the option to stick with the existing system. I also wonder if it would be worth expanding the idea of placing characters next to jump points to further simplify things for newcomers? But that's a seperate idea.
Beta Was this translation helpful? Give feedback.
All reactions