Live data from Hacker News

Show HN: A New Basic Vim Motion

github.com

41–43 of 43 posts

Re: Show HN: A New Basic Vim Motion

#41
post #6

Earlier quoted context omitted.

I actually used to use the single 's' keypress a lot. But at the same time I wasn't happy about that habit, it was often lazy-thinking, instead of using things like cf{char} or even cw, ce. So I committed to use '1s' when I really needed the single substitution, and it worked really well, so I felt I had gained on both sides. Just try and see what you think, you can always remove. And yes I will make it customizable,…

As a little thought exercise, I'm trying to see how many commands I can think of that are equivalent to s. So far: 1s cl c vc xi There's obviously more if you want to add '1' to a couple of these, and more still if you want to go to 3 characters.

Never knew about c (and d and y), I think it would be the easiest. Though I'm happy with 1s and now that I think about it, these {operator} beg to be remapped to something else entirely, maybe inner word or the function's name? I'll play around with onoremap iw

Re: Show HN: A New Basic Vim Motion

#42
post #40
post #28

Earlier quoted context omitted.

You're missing out on using the normal meaning of ; which is really useful. I prefer to map the space bar to : instead. The space bar is not usually mapped to anything, so you wouldn't be masking any other function by mapping it. Also, for jumping long distances, you should really try PreciseJump or EasyMotion. (mentioned elsewhere in this thread)

Reading your comment I have just mapped "space" to ":" ":" to "," That makes sense. Now ; and shift-: works in pair how n and shift-N works in pair.

Good idea, I have just remapped mm (mmw feels natural in Dvorak) to : and my pinkies are gonna be thanking you two many times over.

Re: Show HN: A New Basic Vim Motion

#43
post #33

Earlier quoted context omitted.

Could you explain your use cases of `s`? I've basically never found a use for it given `c` and `r` or `R` but maybe I'm missing something.

Maybe 3 needs to become 42. Maybe x needs to become price. Maybe miapelling needs to become misspelling. I pretty frequently have a one-character thing that needs to be replaced.

Thanks, makes sense. I've done that in slower ways since I've ignored s.
Post reply on HN