3 ms·
Interesting, but I am not willing to surrender a basic key binding like `s` with what can be done with /. It is only an extra key to do the same thing. You sho
by btipling 14y ago
Interesting, but I am not willing to surrender a basic key binding like `s` with what can be done with /. It is only an extra key to do the same thing.
You should lower your ambitions and just make this a function one can key bind to a char of their choice.
Have you tried submitting this to vim as a patch instead? I doubt it would be approved, for a good reason. Nice work though.
- goldfeld 14y agoI 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, but I especially wanted to release this first opinionated version exactly to get feedback like this. Thanks.
- fishtoaster 14y agoAs 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<space> 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.
- goldfeld 14y agoNever knew about c<space> (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}<space> beg to be remapped to something else entirely, maybe inner word or the function's name? I'll play around with onoremap <Space> iw